Class AbstractEntityUsageUtil

  • Direct Known Subclasses:
    DocumentUtil, MediaUtil

    public abstract class AbstractEntityUsageUtil
    extends java.lang.Object
    Abstract utility to deal with entities that have their usage tracked.
    Since:
    17.1.0
    • Constructor Detail

      • AbstractEntityUsageUtil

        public AbstractEntityUsageUtil()
    • Method Detail

      • clearNonExistentLinkedSourcesAndFieldsInternal

        protected void clearNonExistentLinkedSourcesAndFieldsInternal​(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
      • getUsageTable

        protected abstract java.lang.String getUsageTable()
        Returns the entity usage table.
        Returns:
        the entity usage table
        Since:
        17.1.0
      • getEntityIdColumn

        protected abstract java.lang.String getEntityIdColumn()
        Returns the entity identifier column name.
        Returns:
        the entity identifier column name
        Since:
        17.1.0
      • processAddedContentInternal

        protected void processAddedContentInternal​(Source<?> s,
                                                   ISourceField field,
                                                   SourcePostAddDataEvent event,
                                                   java.util.Collection<java.lang.String> referencedEntityIds)
                                            throws PortalException
        Processes the added content.
        Parameters:
        s - the source
        field - the field
        event - the event
        referencedEntityIds - the referenced entities' identifiers
        Throws:
        PortalException
        Since:
        17.1.0
      • processUpdatedContentInternal

        protected void processUpdatedContentInternal​(Source<?> s,
                                                     ISourceField field,
                                                     SourcePostUpdateDataEvent event,
                                                     java.util.Collection<java.lang.String> referencedEntityIds)
                                              throws PortalException
        Processes the updated content.
        Parameters:
        s - the source
        field - the field
        event - the event
        referencedEntityIds - the referenced entities' identifiers
        Throws:
        PortalException
        Since:
        17.1.0