Class HibernateAutomationTriggerDAO

    • Field Summary

      • Fields inherited from interface com.logicaldoc.core.PersistentObjectDAO

        ENTITY
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int applyTriggersToTree​(long rootId)  
      void delete​(long id, int code)  
      AutomationTrigger findByAK​(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 triggered
      AutomationRoutine getAutomation​(String event, Long folderId, long tenantId)
      Retrieves the registered automation script for a given event and folder
      void init()  
      void scheduleTrigger​(AutomationTrigger trigger)
      Schedules the job for the trigger.
      void setFolderDao​(com.logicaldoc.core.folder.FolderDAO folderDao)  
      void setJobManager​(com.logicaldoc.core.job.JobManager jobManager)  
      void setRoutineDao​(AutomationRoutineDAO routineDao)  
      void store​(AutomationTrigger trigger)  
      void unscheduleTrigger​(long triggerId)
      Unschedules the job of the given trigger.
      • Methods inherited from class com.logicaldoc.core.HibernatePersistentObjectDAO

        bulkUpdate, bulkUpdate, delete, deleteAll, deleteAll, findAll, findAll, findAllIds, findAllIds, findById, findById, findByObjectQuery, findByObjectQuery, findByQuery, findByQuery, findByWhere, findByWhere, findByWhere, findIdsByWhere, findIdsByWhere, getDbms, getSessionFactory, initialize, isOracle, jdbcUpdate, jdbcUpdate, query, queryForInt, queryForList, queryForList, queryForLong, queryForLong, queryForObject, queryForRowSet, queryForString, setSessionFactory
      • Methods inherited from interface com.logicaldoc.core.PersistentObjectDAO

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

      • setJobManager

        public void setJobManager​(com.logicaldoc.core.job.JobManager jobManager)
      • getAutomation

        public AutomationRoutine getAutomation​(String event,
                                               Long folderId,
                                               long tenantId)
                                        throws com.logicaldoc.core.PersistenceException
        Description copied from interface: AutomationTriggerDAO
        Retrieves the registered automation script for a given event and folder
        Specified by:
        getAutomation in interface AutomationTriggerDAO
        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
      • setFolderDao

        public void setFolderDao​(com.logicaldoc.core.folder.FolderDAO folderDao)
      • unscheduleTrigger

        public void unscheduleTrigger​(long triggerId)
        Description copied from interface: AutomationTriggerDAO
        Unschedules the job of the given trigger. Do not invoke this directly it is used by the DAO itself.
        Specified by:
        unscheduleTrigger in interface AutomationTriggerDAO
        Parameters:
        triggerId - the event to elaborate
      • delete

        public void delete​(long id,
                           int code)
                    throws com.logicaldoc.core.PersistenceException
        Specified by:
        delete in interface com.logicaldoc.core.PersistentObjectDAO<AutomationTrigger>
        Overrides:
        delete in class com.logicaldoc.core.HibernatePersistentObjectDAO<AutomationTrigger>
        Throws:
        com.logicaldoc.core.PersistenceException
      • init

        public void init()
      • store

        public void store​(AutomationTrigger trigger)
                   throws com.logicaldoc.core.PersistenceException
        Specified by:
        store in interface com.logicaldoc.core.PersistentObjectDAO<AutomationTrigger>
        Overrides:
        store in class com.logicaldoc.core.HibernatePersistentObjectDAO<AutomationTrigger>
        Throws:
        com.logicaldoc.core.PersistenceException