public class TaskanaEngineImpl extends Object implements TaskanaEngine
TaskanaEngine.ConnectionManagementMode| Modifier and Type | Field and Description |
|---|---|
protected Connection |
connection |
protected TaskanaEngine.ConnectionManagementMode |
mode |
protected org.apache.ibatis.session.SqlSessionFactory |
sessionFactory |
protected org.apache.ibatis.session.SqlSessionManager |
sessionManager |
protected static ThreadLocal<Deque<org.apache.ibatis.session.SqlSessionManager>> |
sessionStack |
protected TaskanaEngineConfiguration |
taskanaEngineConfiguration |
protected org.apache.ibatis.transaction.TransactionFactory |
transactionFactory |
| Modifier | Constructor and Description |
|---|---|
protected |
TaskanaEngineImpl(TaskanaEngineConfiguration taskanaEngineConfiguration) |
| Modifier and Type | Method and Description |
|---|---|
void |
checkRoleMembership(TaskanaRole... roles)
Checks whether current user is member of any of the specified roles.
|
void |
closeConnection()
closes the connection to the database in mode EXPLICIT.
|
protected org.apache.ibatis.session.SqlSessionManager |
createSqlSessionManager()
This method creates the sqlSessionManager of myBatis.
|
static TaskanaEngine |
createTaskanaEngine(TaskanaEngineConfiguration taskanaEngineConfiguration) |
boolean |
domainExists(String domain)
Returns true if the given domain does exist in the configuration.
|
ClassificationService |
getClassificationService()
The ClassificationService can be used for operations on all Categories.
|
TaskanaEngineConfiguration |
getConfiguration()
The Taskana configuration.
|
protected static org.apache.ibatis.session.SqlSessionManager |
getSessionFromStack() |
protected static Deque<org.apache.ibatis.session.SqlSessionManager> |
getSessionStack()
With sessionStack, we maintain a Stack of SqlSessionManager objects on a per thread basis.
|
TaskMonitorService |
getTaskMonitorService()
The TaskMonitorService can be used for monitoring Tasks.
|
TaskService |
getTaskService()
The TaskService can be used for operations on all Tasks.
|
WorkbasketService |
getWorkbasketService()
The WorkbasketService can be used for operations on all Workbaskets.
|
boolean |
isUserInRole(TaskanaRole... roles)
check whether the current user is member of one of the roles specified.
|
protected static void |
popSessionFromStack() |
protected static void |
pushSessionToStack(org.apache.ibatis.session.SqlSessionManager session) |
void |
setConnection(Connection connection)
Set the database connection to be used by taskana.
|
void |
setConnectionManagementMode(TaskanaEngine.ConnectionManagementMode mode)
sets the connection management mode.
|
protected static ThreadLocal<Deque<org.apache.ibatis.session.SqlSessionManager>> sessionStack
protected TaskanaEngineConfiguration taskanaEngineConfiguration
protected org.apache.ibatis.transaction.TransactionFactory transactionFactory
protected org.apache.ibatis.session.SqlSessionManager sessionManager
protected org.apache.ibatis.session.SqlSessionFactory sessionFactory
protected TaskanaEngine.ConnectionManagementMode mode
protected Connection connection
protected TaskanaEngineImpl(TaskanaEngineConfiguration taskanaEngineConfiguration)
public static TaskanaEngine createTaskanaEngine(TaskanaEngineConfiguration taskanaEngineConfiguration)
protected static Deque<org.apache.ibatis.session.SqlSessionManager> getSessionStack()
protected static org.apache.ibatis.session.SqlSessionManager getSessionFromStack()
protected static void pushSessionToStack(org.apache.ibatis.session.SqlSessionManager session)
protected static void popSessionFromStack()
public TaskService getTaskService()
TaskanaEnginegetTaskService in interface TaskanaEnginepublic TaskMonitorService getTaskMonitorService()
TaskanaEnginegetTaskMonitorService in interface TaskanaEnginepublic WorkbasketService getWorkbasketService()
TaskanaEnginegetWorkbasketService in interface TaskanaEnginepublic ClassificationService getClassificationService()
TaskanaEnginegetClassificationService in interface TaskanaEnginepublic TaskanaEngineConfiguration getConfiguration()
TaskanaEnginegetConfiguration in interface TaskanaEnginepublic void setConnectionManagementMode(TaskanaEngine.ConnectionManagementMode mode)
setConnectionManagementMode in interface TaskanaEnginemode - - the connection management mode Valid values are:
public void setConnection(Connection connection) throws SQLException
setConnection in interface TaskanaEngineconnection - The connection that passed into TaskanaEngineSQLExceptionpublic void closeConnection()
closeConnection in interface TaskanaEnginepublic void checkRoleMembership(TaskanaRole... roles) throws NotAuthorizedException
checkRoleMembership in interface TaskanaEngineroles - The roles that are checked for membership of the current userNotAuthorizedException - If the current user is not member of any specified rolepublic boolean isUserInRole(TaskanaRole... roles)
isUserInRole in interface TaskanaEngineroles - The roles that are checked for membership of the current userprotected org.apache.ibatis.session.SqlSessionManager createSqlSessionManager()
SqlSessionFactorypublic boolean domainExists(String domain)
domain - the domain specified in the configurationtrue if the domain existsCopyright © 2018. All rights reserved.