Package pro.taskana

Class TaskanaEngineConfiguration


  • public class TaskanaEngineConfiguration
    extends Object
    This central class creates the TaskanaEngine and holds all the information about DB and Security.
    Security is enabled by default.
    • Field Detail

      • propertiesFileName

        protected String propertiesFileName
      • schemaName

        protected String schemaName
      • propertiesSeparator

        protected String propertiesSeparator
      • securityEnabled

        protected boolean securityEnabled
      • useManagedTransactions

        protected boolean useManagedTransactions
      • classificationTypes

        protected List<String> classificationTypes
      • classificationCategoriesByTypeMap

        protected Map<String,​List<String>> classificationCategoriesByTypeMap
    • Constructor Detail

      • TaskanaEngineConfiguration

        public TaskanaEngineConfiguration​(DataSource dataSource,
                                          boolean useManagedTransactions,
                                          String schemaName)
      • TaskanaEngineConfiguration

        public TaskanaEngineConfiguration​(DataSource dataSource,
                                          boolean useManagedTransactions,
                                          boolean securityEnabled,
                                          String schemaName)
      • TaskanaEngineConfiguration

        public TaskanaEngineConfiguration​(DataSource dataSource,
                                          boolean useManagedTransactions,
                                          boolean securityEnabled,
                                          String propertiesFileName,
                                          String propertySeparator,
                                          String schemaName)
    • Method Detail

      • loadProperties

        public static Properties loadProperties​(String propertiesFile)
      • initTaskanaProperties

        public void initTaskanaProperties​(String propertiesFile,
                                          String separator)
      • createDefaultDataSource

        public static DataSource createDefaultDataSource()
      • buildTaskanaEngine

        public TaskanaEngine buildTaskanaEngine()
                                         throws SQLException
        This method creates the TaskanaEngine without an sqlSessionFactory.
        Returns:
        the TaskanaEngine
        Throws:
        SQLException - if a database access error occurs
      • createDatasource

        public static DataSource createDatasource​(String driver,
                                                  String jdbcUrl,
                                                  String username,
                                                  String password)
        This method creates a PooledDataSource, if the needed properties are provided.
        Parameters:
        driver - the name of the jdbc driver
        jdbcUrl - the url to which the jdbc driver connects
        username - the user name for database access
        password - the password for database access
        Returns:
        DataSource
      • isSecurityEnabled

        public boolean isSecurityEnabled()
      • getDatasource

        public DataSource getDatasource()
      • getUseManagedTransactions

        public boolean getUseManagedTransactions()
      • getMaxNumberOfUpdatesPerTransaction

        public int getMaxNumberOfUpdatesPerTransaction()
      • setMaxNumberOfUpdatesPerTransaction

        public void setMaxNumberOfUpdatesPerTransaction​(int jobBatchSize)
      • getMaxNumberOfJobRetries

        public int getMaxNumberOfJobRetries()
      • setMaxNumberOfJobRetries

        public void setMaxNumberOfJobRetries​(int maxNumberOfJobRetries)
      • isCorpusChristiEnabled

        public boolean isCorpusChristiEnabled()
      • setCorpusChristiEnabled

        public void setCorpusChristiEnabled​(boolean corpusChristiEnabled)
      • isGermanPublicHolidaysEnabled

        public boolean isGermanPublicHolidaysEnabled()
      • setGermanPublicHolidaysEnabled

        public void setGermanPublicHolidaysEnabled​(boolean germanPublicHolidaysEnabled)
      • isValidationAllowTimestampServiceLevelMismatch

        public boolean isValidationAllowTimestampServiceLevelMismatch()
      • setValidationAllowTimestampServiceLevelMismatch

        public void setValidationAllowTimestampServiceLevelMismatch​(boolean validationAllowTimestampServiceLevelMismatch)
      • isDeleteHistoryOnTaskDeletionEnabled

        public boolean isDeleteHistoryOnTaskDeletionEnabled()
      • setDeleteHistoryOnTaskDeletionEnabled

        public void setDeleteHistoryOnTaskDeletionEnabled​(boolean deleteHistoryOnTaskDeletionEnabled)
      • setCustomHolidays

        public void setCustomHolidays​(List<CustomHoliday> customHolidays)
      • addCustomHolidays

        public void addCustomHolidays​(List<CustomHoliday> customHolidays)
      • setDomains

        public void setDomains​(List<String> domains)
      • getAddAdditionalUserInfo

        public boolean getAddAdditionalUserInfo()
      • setAddAdditionalUserInfo

        public void setAddAdditionalUserInfo​(boolean addAdditionalUserInfo)
      • getClassificationTypes

        public List<String> getClassificationTypes()
      • setClassificationTypes

        public void setClassificationTypes​(List<String> classificationTypes)
      • getAllClassificationCategories

        public List<String> getAllClassificationCategories()
      • getClassificationCategoriesByTypeMap

        public Map<String,​List<String>> getClassificationCategoriesByTypeMap()
      • getClassificationCategoriesByType

        public List<String> getClassificationCategoriesByType​(String type)
      • setClassificationCategoriesByType

        public void setClassificationCategoriesByType​(Map<String,​List<String>> classificationCategoriesByType)
      • getCleanupJobFirstRun

        public Instant getCleanupJobFirstRun()
      • setCleanupJobFirstRun

        public void setCleanupJobFirstRun​(Instant cleanupJobFirstRun)
      • getCleanupJobRunEvery

        public Duration getCleanupJobRunEvery()
      • setCleanupJobRunEvery

        public void setCleanupJobRunEvery​(Duration cleanupJobRunEvery)
      • getCleanupJobMinimumAge

        public Duration getCleanupJobMinimumAge()
      • setCleanupJobMinimumAge

        public void setCleanupJobMinimumAge​(Duration cleanupJobMinimumAge)
      • isTaskCleanupJobAllCompletedSameParentBusiness

        public boolean isTaskCleanupJobAllCompletedSameParentBusiness()
      • setTaskCleanupJobAllCompletedSameParentBusiness

        public void setTaskCleanupJobAllCompletedSameParentBusiness​(boolean taskCleanupJobAllCompletedSameParentBusiness)
      • getPriorityJobBatchSize

        public int getPriorityJobBatchSize()
      • setPriorityJobBatchSize

        public void setPriorityJobBatchSize​(int priorityJobBatchSize)
      • getPriorityJobFirstRun

        public Instant getPriorityJobFirstRun()
      • setPriorityJobFirstRun

        public void setPriorityJobFirstRun​(Instant priorityJobFirstRun)
      • getPriorityJobRunEvery

        public Duration getPriorityJobRunEvery()
      • setPriorityJobRunEvery

        public void setPriorityJobRunEvery​(Duration priorityJobRunEvery)
      • getUserRefreshJobRunEvery

        public Duration getUserRefreshJobRunEvery()
      • setUserRefreshJobRunEvery

        public void setUserRefreshJobRunEvery​(Duration userRefreshJobRunEvery)
      • getUserRefreshJobFirstRun

        public Instant getUserRefreshJobFirstRun()
      • setUserRefreshJobFirstRun

        public void setUserRefreshJobFirstRun​(Instant userRefreshJobFirstRun)
      • isPriorityJobActive

        public boolean isPriorityJobActive()
      • setPriorityJobActive

        public void setPriorityJobActive​(boolean priorityJobActive)
      • getSchemaName

        public String getSchemaName()
      • setSchemaName

        public void setSchemaName​(String schemaName)
      • shouldUseLowerCaseForAccessIds

        public static boolean shouldUseLowerCaseForAccessIds()
        Helper method to determine whether all access ids (user Id and group ids) should be used in lower case.
        Returns:
        true if all access ids should be used in lower case, false otherwise
      • readPropertiesFromFile

        public Properties readPropertiesFromFile()