Package pro.taskana.common.internal
Interface InternalTaskanaEngine
-
public interface InternalTaskanaEngineFOR INTERNAL USE ONLY.Contains all actions which are necessary within taskana.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description booleandomainExists(String domain)Returns true if the given domain does exist in the configuration.default voidexecuteInDatabaseConnection(Runnable runnable)Executes the given runnable after openConnection is called and then returns the connection.<T> TexecuteInDatabaseConnection(Supplier<T> supplier)Executes the given supplier after openConnection is called and then returns the connection.AfterRequestChangesManagergetAfterRequestChangesManager()Retrieves the AfterRequestChangesManager.AfterRequestReviewManagergetAfterRequestReviewManager()Retrieves the AfterRequestReviewManager.BeforeRequestChangesManagergetBeforeRequestChangesManager()Retrieves the BeforeRequestChangesManager.BeforeRequestReviewManagergetBeforeRequestReviewManager()Retrieves the BeforeRequestReviewManager.CreateTaskPreprocessorManagergetCreateTaskPreprocessorManager()Retrieve CreateTaskPreprocessorManager.TaskanaEnginegetEngine()Retrieve TaskanaEngine.HistoryEventManagergetHistoryEventManager()Retrieve HistoryEventProducer.PriorityServiceManagergetPriorityServiceManager()Retrieves the PriorityServiceManager.ReviewRequiredManagergetReviewRequiredManager()Retrieves the ReviewRequiredManager.org.apache.ibatis.session.SqlSessiongetSqlSession()retrieve the SqlSession used by taskana.TaskRoutingManagergetTaskRoutingManager()Retrieve TaskRoutingProducer.voidinitSqlSession()Initializes the SqlSessionManager.voidopenConnection()Opens the connection to the database.voidreturnConnection()Returns the database connection into the pool.
-
-
-
Method Detail
-
openConnection
void openConnection()
Opens the connection to the database. Has to be called at the beginning of each Api call that accesses the database
-
returnConnection
void returnConnection()
Returns the database connection into the pool. In the case of nested calls, simply pops the latest session from the session stack. Closes the connection if the session stack is empty. In mode AUTOCOMMIT commits before the connection is closed. To be called at the end of each Api call that accesses the database
-
executeInDatabaseConnection
<T> T executeInDatabaseConnection(Supplier<T> supplier)
Executes the given supplier after openConnection is called and then returns the connection.- Type Parameters:
T- any type- Parameters:
supplier- a function that returns something of type T- Returns:
- the result of the supplier
-
executeInDatabaseConnection
default void executeInDatabaseConnection(Runnable runnable)
Executes the given runnable after openConnection is called and then returns the connection.- See Also:
executeInDatabaseConnection(Supplier)
-
initSqlSession
void initSqlSession()
Initializes the SqlSessionManager.
-
domainExists
boolean domainExists(String domain)
Returns true if the given domain does exist in the configuration.- Parameters:
domain- the domain specified in the configuration- Returns:
trueif the domain exists
-
getSqlSession
org.apache.ibatis.session.SqlSession getSqlSession()
retrieve the SqlSession used by taskana.- Returns:
- the myBatis SqlSession object used by taskana
-
getEngine
TaskanaEngine getEngine()
Retrieve TaskanaEngine.- Returns:
- The nested TaskanaEngine.
-
getHistoryEventManager
HistoryEventManager getHistoryEventManager()
Retrieve HistoryEventProducer.- Returns:
- the HistoryEventProducer instance.
-
getTaskRoutingManager
TaskRoutingManager getTaskRoutingManager()
Retrieve TaskRoutingProducer.- Returns:
- the TaskRoutingProducer instance.
-
getCreateTaskPreprocessorManager
CreateTaskPreprocessorManager getCreateTaskPreprocessorManager()
Retrieve CreateTaskPreprocessorManager.- Returns:
- the CreateTaskPreprocessorManager instance.
-
getPriorityServiceManager
PriorityServiceManager getPriorityServiceManager()
Retrieves the PriorityServiceManager.- Returns:
- the PriorityServiceManager instance
-
getReviewRequiredManager
ReviewRequiredManager getReviewRequiredManager()
Retrieves the ReviewRequiredManager.- Returns:
- the ReviewRequiredManager instance
-
getBeforeRequestReviewManager
BeforeRequestReviewManager getBeforeRequestReviewManager()
Retrieves the BeforeRequestReviewManager.- Returns:
- the BeforeRequestReviewManager instance
-
getAfterRequestReviewManager
AfterRequestReviewManager getAfterRequestReviewManager()
Retrieves the AfterRequestReviewManager.- Returns:
- the AfterRequestReviewManager instance
-
getBeforeRequestChangesManager
BeforeRequestChangesManager getBeforeRequestChangesManager()
Retrieves the BeforeRequestChangesManager.- Returns:
- the BeforeRequestChangesManager instance
-
getAfterRequestChangesManager
AfterRequestChangesManager getAfterRequestChangesManager()
Retrieves the AfterRequestChangesManager.- Returns:
- the AfterRequestChangesManager instance
-
-