Class CyclosProperties


  • public class CyclosProperties
    extends Object
    Contains helpers to read from cyclos.properties
    • Method Detail

      • getStoredFileContentManagerAlias

        public static String getStoredFileContentManagerAlias​(String className)
      • getStoredFileContentManagers

        public static Map<String,​String> getStoredFileContentManagers()
      • isUsingOpenSearch

        public static boolean isUsingOpenSearch​(String searchHandler)
      • getAccountsVerificationBalanceCheckDays

        public Set<WeekDay> getAccountsVerificationBalanceCheckDays()
      • getArchiveAccountFeesDays

        public int getArchiveAccountFeesDays()
      • getArchiveBulkActionsDays

        public int getArchiveBulkActionsDays()
        Returns the number of days before bulk actions are archived.
      • getArchiveImportsDays

        public int getArchiveImportsDays()
        Returns the number of days before archiving processed imports, or removing failed ones. Zero means never.
      • getArchivingDeleteDurationMinutes

        public int getArchivingDeleteDurationMinutes()
        Returns the number of minutes (1 - minutes per day) the recurring task that deletes archived entities should run
      • getArchivingDeleteStartHour

        public int getArchivingDeleteStartHour()
        Returns the hour of day (0 - 23) when the recurring task that deletes archived entities should run
      • getArchivingMonths

        public int getArchivingMonths()
        Returns the number of months for data retention of banking data
      • getArchivingPassword

        public String getArchivingPassword()
        Returns the password to authenticate against the external archive application
      • getArchivingUrl

        public String getArchivingUrl()
        Returns the URL for the external archive application which removes data from the database which is out of the retention window
        See Also:
        getArchivingMonths()
      • getArchivingUser

        public String getArchivingUser()
        Returns the user to authenticate against the external archive application
      • getArchivingWaitTimeBetweenDeletesMillis

        public int getArchivingWaitTimeBetweenDeletesMillis()
        The time (in millis) to wait between each batch deletion
      • getCacheSpec

        @Nonnull
        public com.google.common.cache.CacheBuilderSpec getCacheSpec​(String name)
        Returns the CacheBuilderSpec for the cache with the given name
      • getClusterHandlerClass

        @Nonnull
        public String getClusterHandlerClass()
        Returns the class which handles clustering tasks
      • getCorsOrigins

        @Nonnull
        public List<String> getCorsOrigins()
      • getCyclosProperties

        @Nonnull
        public Map<String,​String> getCyclosProperties()
        Returns only those properties explicitly defined (in the file or as a system property) that starts with PROPERTY_PREFIX
      • getDataSourceProviderClass

        @Nonnull
        public String getDataSourceProviderClass()
        Returns the data source provider class
      • getDataSourceProviderProperties

        @Nonnull
        public Properties getDataSourceProviderProperties()
        Returns the properties which are passed to the data source provider
      • getDbPopulatorClass

        @Nonnull
        public String getDbPopulatorClass()
        Returns the populator class for the initial database
      • getDbQueryHandlerClass

        @Nonnull
        public String getDbQueryHandlerClass()
        Returns the native query handler class
      • getExpireExternalPaymentsDays

        @Nonnull
        public int getExpireExternalPaymentsDays()
        Returns the number of days a pending external payment remains in the system until it's expired.
      • getIdMaskClass

        @Nonnull
        public String getIdMaskClass()
        Returns the class for the id mask
      • getLicenseMaxUsersAlertPercentage

        public int getLicenseMaxUsersAlertPercentage()
        Returns a threshold of the maximum allowed registered users
      • getLicenseUrl

        @Nonnull
        public String getLicenseUrl()
        Returns the URL of the license server
      • getLogDataSourceProviderClass

        public String getLogDataSourceProviderClass()
        Returns the class name to use as log data source provider when logging to an external database
      • getLogDataSourceProviderProperties

        public Properties getLogDataSourceProviderProperties()
        Returns the configuration properties for the log data source provider when logging to an external database
      • getLogDir

        @Nonnull
        public String getLogDir()
        Returns the directory where logs should be saved. If set the configuration option will be ignored. If not set, will take into account the configuration option.
      • getLogMaxFiles

        public int getLogMaxFiles()
      • getLogMaxFileSize

        public int getLogMaxFileSize()
      • getLogProviderClass

        public String getLogProviderClass()
      • getMailSleepSeconds

        public int getMailSleepSeconds()
        Returns the number of seconds the e-mail sending should sleep
      • getMaxBackgroundTasks

        public int getMaxBackgroundTasks()
        Returns the maximum background tasks to execute in this Cyclos instance. Setting this to zero effectively disables background tasks
      • getMaxBCryptStrength

        public int getMaxBCryptStrength()
        Returns the maximum BCrypt strength allowed for password types in any network
      • getMaxPoolSize

        public Integer getMaxPoolSize()
        Returns the underlying max pool size for the database connection
      • getMaxRecurringTasks

        public int getMaxRecurringTasks()
        Returns the maximum recurring tasks to execute in this Cyclos instance. Setting this to zero effectively disables recurring tasks
      • getNFCTokenTypeKey

        @Nonnull
        public String getNFCTokenTypeKey()
        Returns the NFC Token Principal type key
      • getProfilingMaxEntries

        public int getProfilingMaxEntries()
      • getProtocolHeader

        public String getProtocolHeader()
        Returns the header which is used to read the original connection protocol (to the proxy / load balancer)
      • getPurgeLoginLogsDays

        public int getPurgeLoginLogsDays()
        Returns the number of days to keep login history logs
      • getPurgeMessagesOnTrashDays

        public int getPurgeMessagesOnTrashDays()
        Returns the number of days messages should be left on trash before being permanently removed. Zero means never remove.
      • getPurgeNotificationsDays

        public int getPurgeNotificationsDays()
        Returns the number of days notifications should be kept before being permanently removed. Zero means never remove.
      • getPurgeSessionsDays

        public int getPurgeSessionsDays()
        Returns the number of days to keep sessions in the database
      • getPurgeUnconfirmedUsersDays

        public int getPurgeUnconfirmedUsersDays()
        Returns the number of days users pending e-mail confirmation should be kept before being permanently removed. Zero means never remove.
      • getRateLimitGlobal

        public int getRateLimitGlobal()
        The rate limit, in request per second, for all clients
      • getRateLimitIp

        public int getRateLimitIp()
        The rate limit, in requests per second, per IP address
      • getRateLimitWhitelist

        public String getRateLimitWhitelist()
        The list of IP addresses to which the rate limit is not applied
      • getReadOnlyDataSourceProviderProperties

        @Nonnull
        public Properties getReadOnlyDataSourceProviderProperties()
        The properties used to configure the read-only datasource
      • getRemoteAddressHeader

        public String getRemoteAddressHeader()
        Returns the header which is used to read the remote address instead of reading directly from requests
      • getRemoteAddressHeaderIndex

        public int getRemoteAddressHeaderIndex()
        Returns the index used to retrieve the remote address from comma-separated list associated to the getRemoteAddressHeader()
      • getResponseHeaders

        public Map<String,​String> getResponseHeaders()
        Headers that should be sent on HTTP responses
      • getSassExecutable

        public String getSassExecutable()
      • getSearchHandlerClass

        @Nonnull
        public String getSearchHandlerClass()
        Returns the class name used to handle searches
      • getSearchHandlerProperties

        @Nonnull
        public Properties getSearchHandlerProperties()
        Returns the properties for the search handler
      • getStoredFileContentManagerClass

        @Nonnull
        public String getStoredFileContentManagerClass()
        Returns the class which handles the file's contents storage.
      • getStoredFileContentManagerProperties

        @Nonnull
        public Properties getStoredFileContentManagerProperties()
      • getTempDir

        @Nonnull
        public File getTempDir()
        Returns the directory where temporary / cached files are stored
      • getTempFilesDir

        public File getTempFilesDir()
      • isArchivingTrustAllCerts

        public boolean isArchivingTrustAllCerts()
        Returns whether SSL certificate errors should be ignored when connecting to the external archive application
      • isCacheQueries

        public boolean isCacheQueries()
        Returns whether the queries cache is enabled
      • isDbManaged

        public boolean isDbManaged()
        Returns whether the database is managed automatically
      • isDebuggableEnv

        public boolean isDebuggableEnv()
        Returns whether the runtime environment is debuggable or not.
        When in dev or running the tests it returns true
      • isDevelopment

        public boolean isDevelopment()
        Indicates whether Cyclos is running in development mode
      • isDisableSearchEnginesIndexing

        public boolean isDisableSearchEnginesIndexing()
        Returns whether indexing by search engines should be disabled
      • isDumpAllErrors

        public boolean isDumpAllErrors()
        Returns whether all errors should be dumped to the error log
      • isForceFlushOnEveryTransaction

        public boolean isForceFlushOnEveryTransaction()
        Returns whether to force flush on every transaction or not.
      • isLicenseIgnoreIssueReports

        public boolean isLicenseIgnoreIssueReports()
      • isRestReference

        public boolean isRestReference()
        Returns whether the REST API reference page (at _root_/api is enabled)
      • isSessionsAnyAddress

        public boolean isSessionsAnyAddress()
        Returns whether sessions can be validated from any IP address (true) or only for the original IP address (false)
      • isSkipEmails

        public boolean isSkipEmails()
        Returns whether emails must be skipped
      • isSkipInitializations

        public boolean isSkipInitializations()
      • isSynchronousLog

        public boolean isSynchronousLog()
        Indicates whether logging should happen in the caller thread (true) or in background (false)
      • isTestingEnv

        public boolean isTestingEnv()
        Indicates whether Cyclos is running the JUnit tests
      • isUseReadOnlyDataSource

        public boolean isUseReadOnlyDataSource()
        Indicates whether a read-only datasource should be used
      • isUsingOpenSearch

        public boolean isUsingOpenSearch()
        Return if it we're using OpenSearch as search handler
      • isWebServicesGzip

        public boolean isWebServicesGzip()
        Returns whether to gzip web services responses larger than a threshold
      • newTempDir

        public File newTempDir()
        Creates a new temporary empty directory in the temp directory
      • newTempFile

        public File newTempFile​(String prefix,
                                String suffix)
        Creates a new temporary file in the temp directory
      • resolveFile

        @Nonnull
        public File resolveFile​(String path)
        Resolves the physical file descriptor for the given path, replacing variables like %t by the temp dir