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
  • Field Summary

    Fields inherited from interface com.logicaldoc.core.PersistentObjectDAO

    ENTITY
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    applyTriggersToTree(long rootId)
     
    findByAK(String event, Long folderId, long tenantId)
     
    findByEvent(String event, long tenantId)
     
    findByFolder(long folderId)
     
    Gets all the triggers that are time-driven and not already triggered
    getAutomation(String event, Long folderId, long tenantId)
    Retrieves the registered automation script for a given event and folder
    void
    Schedules the job for the trigger.
    void
    unscheduleTrigger(long triggerId)
    Unschedules the job of the given trigger.

    Methods inherited from interface com.logicaldoc.core.PersistentObjectDAO

    bulkUpdate, delete, delete, deleteAll, deleteAll, findAll, findAll, findAllIds, findAllIds, findById, findById, findByObjectQuery, findByQuery, findByWhere, findByWhere, findIdsByWhere, findIdsByWhere, getDatabaseMetadata, getDbms, initialize, isOracle, jdbcUpdate, jdbcUpdate, query, query, queryForDouble, queryForDouble, queryForInt, queryForList, queryForList, queryForList, queryForLong, queryForLong, queryForObject, queryForRowSet, queryForRowSet, queryForString, store
  • Method Details

    • findByAK

      AutomationTrigger findByAK(String event, Long folderId, long tenantId)
    • findByEvent

      List<AutomationTrigger> findByEvent(String event, long tenantId)
    • findByFolder

      List<AutomationTrigger> findByFolder(long folderId)
    • 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 at data layer
    • 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