Interface IDocumentManager

  • All Known Implementing Classes:
    DocumentManager

    public interface IDocumentManager
    • Method Detail

      • get

        DocumentConfig get​(SessionConfig sessionConfig,
                           java.lang.String documentId,
                           ITransaction transaction)
                    throws PortalException
        Returns the DocumentConfig for a document with the given id.
        Parameters:
        sessionConfig - identifier for the session.
        documentId - the id of the document.
        transaction - the transaction for persistence access.
        Returns:
        the DocumentConfig for the document, or null if it is not found.
        Throws:
        PortalException
      • getFolderIdsByParentAndName

        java.util.Collection<java.lang.String> getFolderIdsByParentAndName​(SessionConfig sessionConfig,
                                                                           java.lang.String serviceInstanceId,
                                                                           java.lang.String parentFolderId,
                                                                           java.lang.String folderName,
                                                                           ITransaction transaction)
                                                                    throws PortalException
        Returns the ids of the folders child of the given parent and with the given name.
        Parameters:
        sessionConfig - identifier for the session.
        serviceInstanceId - the content's service instance id.
        parentFolderId - the parent folder's id. Null if the folder must not have parent.
        folderName - the folder name.
        transaction - the transaction for persistence access.
        Returns:
        Throws:
        PortalException
      • getChildren

        java.util.Collection<DocumentConfig> getChildren​(SessionConfig sessionConfig,
                                                         java.lang.String serviceInstanceId,
                                                         java.lang.String folderId,
                                                         int type,
                                                         ITransaction transaction)
                                                  throws PortalException
        Returns the entries in the specified folder.
        Parameters:
        sessionConfig - identifier for the session.
        serviceInstanceId - the document service instance id.
        folderId - the id of the folder.
        type - the entry types to be returned. Must be DocumentConfig.TYPE_FOLDER, DocumentConfig.TYPE_DOCUMENT or TYPE_ALL.
        transaction - the transaction for persistence access.
        Returns:
        the entries in the specified folder, or an empty collection if none is found.
        Throws:
        PortalException
      • getFolderPath

        java.lang.String getFolderPath​(SessionConfig sessionConfig,
                                       java.lang.String folderId,
                                       ITransaction transaction)
                                throws PortalException
        Returns the virtual path to the folder.
        Parameters:
        sessionConfig - identifier for the session.
        folderId - the id of the folder.
        transaction - the transaction for persistence access.
        Returns:
        the virtual path to the folder.
        Throws:
        PortalException
      • moveDocument

        void moveDocument​(SessionConfig sessionConfig,
                          java.lang.String documentId,
                          java.lang.String destFolderId,
                          ITransaction transaction)
                   throws PortalException
        Moves a document (or a folder) to another folder.
        Parameters:
        sessionConfig - identifier for the session.
        documentId - the document's id.
        destFolderId - the id of the destination folder.
        transaction - the transaction for persistence access.
        Throws:
        PortalException
      • updateDocumentHierarchyPublishTo

        void updateDocumentHierarchyPublishTo​(java.lang.String documentId,
                                              java.util.Collection<java.lang.String> heritagePrincipalsId)
                                       throws PortalException

        Update the list of principals the document is published to

        When the document type is a folder, the entire file tree inside it will also be updated taking into account their inheritance.

        Parameters:
        documentId - The document identifier to update
        heritagePrincipalsId - The list of principals to set.
        Throws:
        PortalException
        Since:
        10.1.0
      • getDocumentPublishToPrincipals

        java.util.Collection<java.lang.String> getDocumentPublishToPrincipals​(java.lang.String documentId)
                                                                       throws PortalException
        Return a the list of principals for which the document is published to.
        Parameters:
        documentId - The document identifier
        Returns:
        A list containing the identifier of all principals.
        Throws:
        PortalException
        Since:
        10.1.0