Package lumis.service.document
Class DocumentUtil
- java.lang.Object
-
- lumis.service.abstraceentityusage.AbstractEntityUsageUtil
-
- lumis.service.document.DocumentUtil
-
public class DocumentUtil extends AbstractEntityUsageUtil
Document related utility methods.- Since:
- 17.1.0
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
clearNonExistentLinkedSourcesAndFields(SessionConfig sessionConfig, ServiceConfig serviceConfig, org.w3c.dom.Node douiDefinitionNode, ITransaction transaction)
Clear non-existent linked sources and fields.static java.lang.String
getDocumentIdFromFileId(java.lang.String fileId)
Check if a file is a document file and return the document identifier, if so, ornull
if no document was found for the given identifier.protected java.lang.String
getEntityIdColumn()
Returns the entity identifier column name.protected java.lang.String
getUsageTable()
Returns the entity usage table.static void
processAddedContent(Source<?> s, ISourceField field, SourcePostAddDataEvent event, java.util.Collection<java.lang.String> referencedDocuments)
Processes the added content.static void
processUpdatedContent(Source<?> s, ISourceField field, SourcePostUpdateDataEvent event, java.util.Collection<java.lang.String> referencedDocuments)
Processes the updated content.-
Methods inherited from class lumis.service.abstraceentityusage.AbstractEntityUsageUtil
clearNonExistentLinkedSourcesAndFieldsInternal, processAddedContentInternal, processUpdatedContentInternal
-
-
-
-
Method Detail
-
getEntityIdColumn
protected java.lang.String getEntityIdColumn()
Description copied from class:AbstractEntityUsageUtil
Returns the entity identifier column name.- Specified by:
getEntityIdColumn
in classAbstractEntityUsageUtil
- Returns:
- the entity identifier column name
-
getUsageTable
protected java.lang.String getUsageTable()
Description copied from class:AbstractEntityUsageUtil
Returns the entity usage table.- Specified by:
getUsageTable
in classAbstractEntityUsageUtil
- Returns:
- the entity usage table
-
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, ornull
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 sourcefield
- the fieldevent
- the eventreferencedDocuments
- 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 sourcefield
- the fieldevent
- the eventreferencedDocuments
- 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
-
-