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
-
Method Summary
Modifier and TypeMethodDescriptionint
applyTriggersToTree
(long rootId) findByEvent
(String event, long tenantId) findByFolder
(long folderId) findTimeDrivenNotAlreadyTriggered
(Date oldestDate) Gets all the triggers that are time-driven and not already triggeredgetAutomation
(String event, Long folderId, long tenantId) Retrieves the registered automation script for a given event and foldervoid
scheduleTrigger
(AutomationTrigger trigger) 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, 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
-
findByAK
-
findByEvent
-
findByFolder
-
findTimeDrivenNotAlreadyTriggered
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 codefolderId
- 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
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
-