Interface AutomationTriggerDAO

  • All Superinterfaces:
    com.logicaldoc.core.PersistentObjectDAO<AutomationTrigger>
    All Known Implementing Classes:
    HibernateAutomationTriggerDAO

    public interface AutomationTriggerDAO
    extends com.logicaldoc.core.PersistentObjectDAO<AutomationTrigger>
    DAO to handle automation routines.
    Since:
    8.1
    Author:
    Marco Meschieri - LogicalDOC
    • Method Detail

      • findTimeDrivenNotAlreadyTriggered

        List<AutomationTrigger> findTimeDrivenNotAlreadyTriggered​(Date oldestDate)
        Gets all the triggers that are time-driven and not already triggered
        Parameters:
        oldestDate - the oldest date to take into account (valid only for those triggers that specify an exact date)
        Returns:
        the list of triggers
      • getAutomation

        AutomationRoutine getAutomation​(String event,
                                        Long folderId,
                                        long tenantId)
                                 throws com.logicaldoc.core.PersistenceException
        Retrieves the registered automation script for a given event and folder
        Parameters:
        event - the event's code
        folderId - identifier of the folder (optional)
        tenantId - identifier of the tenant
        Returns:
        the routine containing the automation to run, if the trigger defines the scripts directly a dummy routine is returned
        Throws:
        com.logicaldoc.core.PersistenceException - error in the database
      • applyTriggersToTree

        int applyTriggersToTree​(long rootId)
      • scheduleTrigger

        void scheduleTrigger​(AutomationTrigger trigger)
        Schedules the job for the trigger. Do not invoke this directly it is used by the DAO itself.
        Parameters:
        trigger - the time-driven trigger to schedule
      • unscheduleTrigger

        void unscheduleTrigger​(long triggerId)
        Unschedules the job of the given trigger. Do not invoke this directly it is used by the DAO itself.
        Parameters:
        triggerId - the event to elaborate