Class DocumentUtil

    • Method Detail

      • getDocumentIdFromFileId

        public static java.lang.String getDocumentIdFromFileId​(java.lang.String fileId)
                                                        throws PortalException
        Check if a file is a document file and return the document identifier, if so, or null if no document was found for the given identifier.
        Parameters:
        fileId - the file identifier
        Returns:
        the document's identifier or null if no such document was fond
        Throws:
        PortalException
        Since:
        17.1.0
      • processAddedContent

        public static void processAddedContent​(Source<?> s,
                                               ISourceField field,
                                               SourcePostAddDataEvent event,
                                               java.util.Collection<java.lang.String> referencedDocuments)
                                        throws PortalException
        Processes the added content.
        Parameters:
        s - the source
        field - the field
        event - the event
        referencedDocuments - the referenced documents
        Throws:
        PortalException
        Since:
        17.1.0
      • processUpdatedContent

        public static void processUpdatedContent​(Source<?> s,
                                                 ISourceField field,
                                                 SourcePostUpdateDataEvent event,
                                                 java.util.Collection<java.lang.String> referencedDocuments)
                                          throws PortalException
        Processes the updated content.
        Parameters:
        s - the source
        field - the field
        event - the event
        referencedDocuments - the referenced documents
        Throws:
        PortalException
        Since:
        17.1.0
      • clearNonExistentLinkedSourcesAndFields

        public static void clearNonExistentLinkedSourcesAndFields​(SessionConfig sessionConfig,
                                                                  ServiceConfig serviceConfig,
                                                                  org.w3c.dom.Node douiDefinitionNode,
                                                                  ITransaction transaction)
                                                           throws PortalException
        Clear non-existent linked sources and fields.
        Parameters:
        sessionConfig - the user session information.
        serviceConfig - the service being registered.
        douiDefinitionNode - the doui definition node.
        transaction - the transaction.
        Throws:
        PortalException
        Since:
        17.1.0