Interface AutomationRoutineDAO

All Superinterfaces:
com.logicaldoc.core.PersistentObjectDAO<AutomationRoutine>
All Known Implementing Classes:
HibernateAutomationRoutineDAO

public interface AutomationRoutineDAO extends com.logicaldoc.core.PersistentObjectDAO<AutomationRoutine>
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
    findByName(String name, long tenantId)
     
    findByUser(long userId)
    This method loads all the routines accessible by the given user
    Set<com.logicaldoc.core.security.Permission>
    getEnabledPermissions(long routineId, long userId)
    Finds all permissions of a user enabled on the specified routine
    boolean
    isReadEnabled(long routineId, long userId)
    This method is looking up for read rights for a routine and an user
    boolean
    isWriteEnabled(long routineId, long userId)
    Returns if a routine is writable for a user

    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

    • findByName

      AutomationRoutine findByName(String name, long tenantId)
    • findByUser

      List<AutomationRoutine> findByUser(long userId)
      This method loads all the routines accessible by the given user
      Parameters:
      userId - optional user specification
      Returns:
      list of automation routines with read permission for the user
    • getEnabledPermissions

      Set<com.logicaldoc.core.security.Permission> getEnabledPermissions(long routineId, long userId)
      Finds all permissions of a user enabled on the specified routine
      Parameters:
      routineId - ID of the routine
      userId - ID of the user
      Returns:
      Collection of enabled permissions
    • isWriteEnabled

      boolean isWriteEnabled(long routineId, long userId)
      Returns if a routine is writable for a user
      Parameters:
      routineId - check this routine
      userId - privileges for this should be checked
      Returns:
      if the user can edit the routine
    • isReadEnabled

      boolean isReadEnabled(long routineId, long userId)
      This method is looking up for read rights for a routine and an user
      Parameters:
      routineId - ID of the routine
      userId - ID of the user
      Returns:
      if the user can access the routine