Class DaoActionHookHelper


  • public class DaoActionHookHelper
    extends Object
    • Field Detail

      • LOG

        public static final org.slf4j.Logger LOG
    • Constructor Detail

      • DaoActionHookHelper

        public DaoActionHookHelper()
    • Method Detail

      • getActionsReferencingClientResource

        @Deprecated
        public static List<de.xima.cmn.dao.interfaces.IEntity<Long>> getActionsReferencingClientResource​(IEntityContext ec,
                                                                                                         MandantRessource entity)
        Deprecated.
        Use #getReferencingWorkflowElementsInClient(IEntityContext, Mandant, IUUIDEntity)
        Parameters:
        ec - Current entity context.
        entity - Client resource to check.
        Returns:
        Actions that reference the resource.
      • getActionsReferencingDbConnection

        @Deprecated
        public static List<Aktion> getActionsReferencingDbConnection​(IEntityContext ec,
                                                                     DatenbankZugriff dbConnection)
        Deprecated.
        Use #getReferencingWorkflowElementsInClient(IEntityContext, Mandant, IUUIDEntity)
        Parameters:
        ec - Current entity context.
        dbConnection - Connection to check.
        Returns:
        Actions that reference the resource.
      • getActionsReferencingInbox

        @Deprecated
        public static Collection<Aktion> getActionsReferencingInbox​(IEntityContext ec,
                                                                    Postfach inbox)
        Deprecated.
        Use #getReferencingWorkflowElementsInClient(IEntityContext, Mandant, IUUIDEntity)
        Parameters:
        ec - Current entity context.
        inbox - Inbox to check.
        Returns:
        Actions that reference the resource.
      • getActionsReferencingProjectResource

        @Deprecated
        public static List<de.xima.cmn.dao.interfaces.IEntity<Long>> getActionsReferencingProjectResource​(IEntityContext ec,
                                                                                                          ProjektRessource entity)
        Deprecated.
        Use #getReferencingWorkflowElementsInProject(IEntityContext, Projekt, IUUIDEntity)
        Parameters:
        ec - Current entity context.
        entity - Project resource to check.
        Returns:
        Actions that reference the resource.
      • getActionsReferencingTextTemplate

        @Deprecated
        public static List<de.xima.cmn.dao.interfaces.IEntity<Long>> getActionsReferencingTextTemplate​(IEntityContext ec,
                                                                                                       Textbaustein template)
        Deprecated.
        Use #getReferencingWorkflowElementsInClient(IEntityContext, Mandant, IUUIDEntity)
        Parameters:
        ec - Current entity context.
        template - Text template to check.
        Returns:
        Actions that reference the resource.
      • getReferencingWorkflowElementsInClient

        public static List<? extends de.xima.cmn.dao.interfaces.IEntity<Long>> getReferencingWorkflowElementsInClient​(IEntityContext ec,
                                                                                                                      Mandant client,
                                                                                                                      de.xima.cmn.dao.interfaces.IEntity<Long> entity)
        Finds all workflow elements (nodes / triggers) that have a reference to the given entity. Only workflow element in the given client scope are considered.

        When elements are found, this method also adds the corresponding workflow version and project before the nodes (to make it easier for users to identify where the nodes and triggers are).

        Parameters:
        ec - Entity context for accessing the database.
        client - Client to which to limit the search.
        entity - Entity for which to scan for references.
        Returns:
        All workflow elements (nodes / triggers) that have a reference to the given entity
      • getReferencingWorkflowElementsInProject

        public static List<de.xima.cmn.dao.interfaces.IEntity<Long>> getReferencingWorkflowElementsInProject​(IEntityContext ec,
                                                                                                             Projekt project,
                                                                                                             de.xima.cmn.dao.interfaces.IEntity<Long> entity)
        Finds all workflow elements (nodes / triggers) that have a reference to the given entity. Only workflow element in the given project scope are considered.

        When elements are found, this method also adds the corresponding workflow version before the nodes (to make it easier for users to identify where the nodes and triggers are).

        Parameters:
        ec - Entity context for accessing the database.
        project - Project to which to limit the search.
        entity - Entity for which to scan for references.
        Returns:
        All workflow elements (nodes / triggers) that have a reference to the given entity
      • getReferencingWorkflowElementsInVersion

        public static List<? extends de.xima.cmn.dao.interfaces.IEntity<Long>> getReferencingWorkflowElementsInVersion​(IEntityContext ec,
                                                                                                                       WorkflowVersion version,
                                                                                                                       de.xima.cmn.dao.interfaces.IEntity<Long> entity)
        Finds all workflow elements (nodes / triggers) that have a reference to the given entity. Only workflow element in the given version are considered.
        Parameters:
        ec - Entity context for accessing the database.
        version - Workflow version to which to limit the search.
        entity - Entity for which to scan for references.
        Returns:
        All workflow elements (nodes / triggers) that have a reference to the given entity
      • getStatusChangeActions

        public static List<de.xima.cmn.dao.interfaces.IEntity<Long>> getStatusChangeActions​(IEntityContext ec,
                                                                                            Status targetState)
        Liefert eine Liste aller 'Statusänderungs'-Aktionen zurück, die auf den übergebenen Status verweisen.
        Parameters:
        ec - the entity context to perform the query with
        targetState - the status from which the actions should be retrieved
        Returns:
        an List of Status-change actions
      • isStatusWiedervorlage

        public static boolean isStatusWiedervorlage​(Status s)
      • removeModulDependency

        public static void removeModulDependency​(IEntityContext ec,
                                                 Rolle rolle)
      • syncBerechtigungen

        public static void syncBerechtigungen​(IEntityContext ec,
                                              Rolle rolle)