Class TaskanaEngineImpl

    • Method Detail

      • isHistoryEnabled

        public boolean isHistoryEnabled()
        Description copied from interface: TaskanaEngine
        Checks if the history plugin is enabled.
        Specified by:
        isHistoryEnabled in interface TaskanaEngine
        Returns:
        true if the history is enabled. Otherwise false.
      • setConnectionManagementMode

        public void setConnectionManagementMode​(TaskanaEngine.ConnectionManagementMode mode)
        Description copied from interface: TaskanaEngine
        sets the connection management mode.
        Specified by:
        setConnectionManagementMode in interface TaskanaEngine
        Parameters:
        mode - the connection management mode Valid values are:
        • PARTICIPATE - taskana participates in global transaction. This is the default mode.
        • AUTOCOMMIT - taskana commits each API call separately
        • EXPLICIT - commit processing is managed explicitly by the client
      • setConnection

        public void setConnection​(Connection connection)
                           throws SQLException
        Description copied from interface: TaskanaEngine
        Set the connection to be used by taskana in mode CONNECTION_MANAGED_EXTERNALLY. If this Api is called, taskana uses the connection passed by the client for all subsequent API calls until the client resets this connection. Control over commit and rollback of the connection is the responsibility of the client. In order to close the connection, closeConnection() or setConnection(null) has to be called.
        Specified by:
        setConnection in interface TaskanaEngine
        Parameters:
        connection - - The java.sql.Connection that is controlled by the client
        Throws:
        SQLException - if a database access error occurs
      • closeConnection

        public void closeConnection()
        Description copied from interface: TaskanaEngine
        Closes the client's connection, sets it to null and switches to mode PARTICIPATE. Only applicable in mode EXPLICIT. Has the same effect as setConnection(null).
        Specified by:
        closeConnection in interface TaskanaEngine
      • isUserInRole

        public boolean isUserInRole​(TaskanaRole... roles)
        Description copied from interface: TaskanaEngine
        check whether the current user is member of one of the roles specified.
        Specified by:
        isUserInRole in interface TaskanaEngine
        Parameters:
        roles - The roles that are checked for membership of the current user
        Returns:
        true if the current user is a member of at least one of the specified groups
      • createSqlSessionManager

        protected org.apache.ibatis.session.SqlSessionManager createSqlSessionManager()
        This method creates the sqlSessionManager of myBatis. It integrates all the SQL mappers and sets the databaseId attribute.
        Returns:
        a SqlSessionFactory