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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intapplyTriggersToTree(long rootId)AutomationTriggerfindByAK(String event, Long folderId, long tenantId)List<AutomationTrigger>findByEvent(String event, long tenantId)List<AutomationTrigger>findByFolder(long folderId)List<AutomationTrigger>findTimeDrivenNotAlreadyTriggered(Date oldestDate)Gets all the triggers that are time-driven and not already triggeredAutomationRoutinegetAutomation(String event, Long folderId, long tenantId)Retrieves the registered automation script for a given event and foldervoidscheduleTrigger(AutomationTrigger trigger)Schedules the job for the trigger.voidunscheduleTrigger(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, getDbms, initialize, isOracle, jdbcUpdate, jdbcUpdate, query, queryForInt, queryForList, queryForList, queryForLong, queryForObject, queryForRowSet, queryForString, store
-
-
-
-
Method Detail
-
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 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 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
-
-