Class AmetysObjectDao
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.ametys.plugins.repository.workspace.AmetysObjectDao
- All Implemented Interfaces:
Component,LogEnabled,Serviceable
DAO providing methods to manage
AmetysObjects.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAmetysObject(String parentId, String name, String type) Add an AmetysObject to the repository.Get information on anAmetysObjectfrom its identifier.getAmetysObjectByPath(String path) Get information on anAmetysObject, found by its path.getAmetysObjects(Collection<String> ids) Get information on aAmetysObjects from their identifier.protected voidputAmetysObjectInfo(Map<String, Object> info, AmetysObject obj) Fill the given Map with information on an AmetysObject.Execute a query to find AmetysObjects.voidRemove an AmetysObject.voidremoveMetadata(String id, String compositePath, String metadataName) Remove a metadata of a Ametys objectvoidservice(ServiceManager serviceManager) voidUnlock an AmetysObject.Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Field Details
-
_resolver
The AmetysObject resolver.
-
-
Constructor Details
-
AmetysObjectDao
public AmetysObjectDao()
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
getAmetysObject
Get information on anAmetysObjectfrom its identifier.- Parameters:
id- the AmetysObject identifier.- Returns:
- information on the AmetysObject as a Map.
-
getAmetysObjectByPath
Get information on anAmetysObject, found by its path.- Parameters:
path- the absolute AmetysObject path (starting with /ametys:root).- Returns:
- information on the AmetysObject as a Map.
-
getAmetysObjects
Get information on aAmetysObjects from their identifier.- Parameters:
ids- a Collection of AmetysObject identifiers.- Returns:
- a Map containing the list of AmetysObject info ('objects' key) and the list of unknown identifiers ('notFound' key).
-
addAmetysObject
Add an AmetysObject to the repository.- Parameters:
parentId- the parent AmetysObject ID, must be ModifiableTraversable.name- the name of the AmetysObject to create.type- the AmetysObject type.- Returns:
- a Map of information on the created AmetysObject.
-
removeAmetysObject
Remove an AmetysObject.- Parameters:
id- the identifier of the AmetysObject to remove.
-
removeMetadata
Remove a metadata of a Ametys object- Parameters:
id- the identifier of the AmetysObjectcompositePath- the path of the parent metadata. Can be null or empty.metadataName- The name of metadata to remove
-
unlockAmetysObject
Unlock an AmetysObject.- Parameters:
id- the identifier of the AmetysObject to remove.
-
query
Execute a query to find AmetysObjects.- Parameters:
query- the query to execute.- Returns:
- a List of AmetysObject info (as Maps).
-
putAmetysObjectInfo
Fill the given Map with information on an AmetysObject.- Parameters:
info- the Map to fill.obj- the AmetysObject.
-