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 TypeMethodDescriptionfindByName
(String name, long tenantId) findByUser
(long userId) This method loads all the routines accessible by the given userSet<com.logicaldoc.core.security.Permission>
getEnabledPermissions
(long routineId, long userId) Finds all permissions of a user enabled on the specified routineboolean
isReadEnabled
(long routineId, long userId) This method is looking up for read rights for a routine and an userboolean
isWriteEnabled
(long routineId, long userId) Returns if a routine is writable for a userMethods 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
-
findByUser
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
Finds all permissions of a user enabled on the specified routine- Parameters:
routineId
- ID of the routineuserId
- 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 routineuserId
- 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 routineuserId
- ID of the user- Returns:
- if the user can access the routine
-