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 Link icon

    Fields inherited from interface com.logicaldoc.core.PersistentObjectDAO Link icon

    ENTITY
  • Method Summary Link icon

    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 Link icon

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

    • findByAK Link icon

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

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

      List<AutomationTrigger> findByFolder(long folderId)
    • findTimeDrivenNotAlreadyTriggered Link icon

      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 Link icon

      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 Link icon

      int applyTriggersToTree(long rootId)
    • scheduleTrigger Link icon

      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 Link icon

      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