Class AmetysObjectDao

    • Method Detail

      • getAmetysObjectByPath

        public Map<String,​ObjectgetAmetysObjectByPath​(String path)
        Get information on an AmetysObject, found by its path.
        Parameters:
        path - the absolute AmetysObject path (starting with /ametys:root).
        Returns:
        information on the AmetysObject as a Map.
      • getAmetysObjects

        public Map<String,​ObjectgetAmetysObjects​(Collection<String> ids)
        Get information on a AmetysObjects 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

        public Map<String,​ObjectaddAmetysObject​(String parentId,
                                                        String name,
                                                        String type)
        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

        public void removeAmetysObject​(String id)
        Remove an AmetysObject.
        Parameters:
        id - the identifier of the AmetysObject to remove.
      • removeMetadata

        public void removeMetadata​(String id,
                                   String compositePath,
                                   String metadataName)
        Remove a metadata of a Ametys object
        Parameters:
        id - the identifier of the AmetysObject
        compositePath - the path of the parent metadata. Can be null or empty.
        metadataName - The name of metadata to remove
      • unlockAmetysObject

        public void unlockAmetysObject​(String id)
        Unlock an AmetysObject.
        Parameters:
        id - the identifier of the AmetysObject to remove.
      • query

        public List<Map<String,​Object>> query​(String query)
        Execute a query to find AmetysObjects.
        Parameters:
        query - the query to execute.
        Returns:
        a List of AmetysObject info (as Maps).