Class ParaConfig

java.lang.Object
com.erudika.para.core.utils.Config
com.erudika.para.core.utils.ParaConfig

public class ParaConfig extends Config
Para configuration.
Author:
Alex Bogdanovski [[email protected]]
  • Constructor Details

    • ParaConfig

      public ParaConfig()
  • Method Details

    • getConfigRootPrefix

      public String getConfigRootPrefix()
      Description copied from class: Config
      The root prefix of the configuration property names, e.g. "para".
      Specified by:
      getConfigRootPrefix in class Config
      Returns:
      the root prefix for all config property keys.
    • appName

      public String appName()
      Returns:
      The name of the default application.
    • serverContextPath

      public String serverContextPath()
    • serverPort

      public int serverPort()
    • environment

      public String environment()
    • daoPlugin

      public String daoPlugin()
    • searchPlugin

      public String searchPlugin()
    • cachePlugin

      public String cachePlugin()
    • queuePlugin

      public String queuePlugin()
    • fileStoragePlugin

      public String fileStoragePlugin()
    • emailerPlugin

      public String emailerPlugin()
    • isSearchEnabled

      public boolean isSearchEnabled()
    • isCacheEnabled

      public boolean isCacheEnabled()
    • webhooksEnabled

      public boolean webhooksEnabled()
    • apiEnabled

      public boolean apiEnabled()
    • clusterName

      public String clusterName()
    • corePackageName

      public String corePackageName()
    • adminIdentifier

      public String adminIdentifier()
    • workerId

      public String workerId()
    • executorThreads

      public int executorThreads()
    • maxFailedWebhookAttempts

      public int maxFailedWebhookAttempts()
    • reindexBatchSize

      public int reindexBatchSize(int max)
    • syncIndexWithDatabaseEnabled

      public boolean syncIndexWithDatabaseEnabled()
    • readFromIndexEnabled

      public boolean readFromIndexEnabled()
    • maxDatatypesPerApp

      public int maxDatatypesPerApp()
    • maxEntitySizeBytes

      public int maxEntitySizeBytes()
    • healthCheckInvervalSec

      public int healthCheckInvervalSec()
    • healthCheckEnabled

      public boolean healthCheckEnabled()
    • facebookAppId

      public String facebookAppId()
    • facebookSecret

      public String facebookSecret()
    • googleAppId

      public String googleAppId()
    • googleSecret

      public String googleSecret()
    • linkedinAppId

      public String linkedinAppId()
    • linkedinSecret

      public String linkedinSecret()
    • twitterAppId

      public String twitterAppId()
    • twitterSecret

      public String twitterSecret()
    • githubAppId

      public String githubAppId()
    • githubSecret

      public String githubSecret()
    • microsoftAppId

      public String microsoftAppId()
    • microsoftSecret

      public String microsoftSecret()
    • microsoftTenantId

      public String microsoftTenantId()
    • amazonAppId

      public String amazonAppId()
    • amazonSecret

      public String amazonSecret()
    • slackAppId

      public String slackAppId()
    • slackSecret

      public String slackSecret()
    • mattermostAppId

      public String mattermostAppId()
    • mattermostSecret

      public String mattermostSecret()
    • getOAuthKeysForApp

      public String[] getOAuthKeysForApp(App app, String prefix)
      Return the OAuth app ID and secret key for a given app by reading the app settings, or the config file.
      Parameters:
      app - the app in which to look for these keys
      prefix - a service prefix: "fb" for facebook, "tw" for twitter etc. See Config
      Returns:
      an array ["app_id", "secret_key"] or ["", ""]
    • corsEnabled

      public boolean corsEnabled()
    • csrfProtectionEnabled

      public boolean csrfProtectionEnabled()
    • csrfCookieName

      public String csrfCookieName()
    • authCookieName

      public String authCookieName()
    • requestExpiresAfterSec

      public int requestExpiresAfterSec()
    • jwtExpiresAfterSec

      public int jwtExpiresAfterSec()
    • jwtRefreshIntervalSec

      public int jwtRefreshIntervalSec()
    • idTokenExpiresAfterSec

      public int idTokenExpiresAfterSec()
    • sessionTimeoutSec

      public int sessionTimeoutSec()
    • minPasswordLength

      public int minPasswordLength()
    • passwordResetTimeoutSec

      public int passwordResetTimeoutSec()
    • maxPasswordMatchingAttempts

      public int maxPasswordMatchingAttempts()
    • passwordMatchingLockPeriodHours

      public int passwordMatchingLockPeriodHours()
    • returnToCookieName

      public String returnToCookieName()
    • supportEmail

      public String supportEmail()
    • allowUnverifiedEmails

      public boolean allowUnverifiedEmails()
    • protectedPaths

      public com.typesafe.config.ConfigObject protectedPaths()
    • ignoredPaths

      public com.typesafe.config.ConfigList ignoredPaths()
    • signinPath

      public String signinPath()
    • signinSuccessPath

      public String signinSuccessPath()
    • signinFailurePath

      public String signinFailurePath()
    • signoutPath

      public String signoutPath()
    • signoutSuccessPath

      public String signoutSuccessPath()
    • accessDeniedPath

      public String accessDeniedPath()
    • returnToPath

      public String returnToPath()
    • rememberMeEnabled

      @Deprecated public boolean rememberMeEnabled()
      Deprecated.
    • appSecretKey

      @Deprecated public String appSecretKey()
      Deprecated.
    • defaultQueueName

      public String defaultQueueName()
      Returns:
      The default queue name which will be polled for incoming JSON messages.
    • queuePollingEnabled

      public boolean queuePollingEnabled()
    • queuePollingWaitSec

      public int queuePollingWaitSec()
    • queuePollingIntervalSec

      public int queuePollingIntervalSec()
    • riverMaxIndexingRetries

      public int riverMaxIndexingRetries()
    • globalSyncIntervalSec

      public int globalSyncIntervalSec()
    • metricsEnabled

      public boolean metricsEnabled()
    • metricsLoggingIntervalSec

      public int metricsLoggingIntervalSec()
    • metricsGraphiteHost

      public String metricsGraphiteHost()
    • metricsGraphitePort

      public int metricsGraphitePort()
    • metricsGraphitePrefixSystem

      public String metricsGraphitePrefixSystem()
    • metricsGraphitePrefixApps

      public String metricsGraphitePrefixApps()
    • metricsGraphitePeriodSec

      public int metricsGraphitePeriodSec()
    • metricsJmxEnabled

      public boolean metricsJmxEnabled()
    • ldapPasswordParameter

      public String ldapPasswordParameter()
    • ldapUsernameParameter

      public String ldapUsernameParameter()
    • getLdapSettingsForApp

      public Map<String,String> getLdapSettingsForApp(App app)
      Returns a map of LDAP configuration properties for a given app, read from app.settings or config file.
      Parameters:
      app - the app in which to look for these keys
      Returns:
      a map of keys and values
    • awsS3Bucket

      public String awsS3Bucket(String region)
    • awsS3MaxFileSizeMb

      public int awsS3MaxFileSizeMb()
    • localFileStoreFolder

      public String localFileStoreFolder()
    • localFileStoreMaxFileSizeMb

      public int localFileStoreMaxFileSizeMb()
    • clientSslProtocols

      public String clientSslProtocols()
    • clientSslKeystore

      public String clientSslKeystore()
    • clientSslKeystorePassword

      public String clientSslKeystorePassword()
    • clientSslTruststore

      public String clientSslTruststore()
    • clientSslTruststorePassword

      public String clientSslTruststorePassword()
    • clientUserAgentEnabled

      public boolean clientUserAgentEnabled()
    • getSettingForApp

      public String getSettingForApp(App app, String key, String defaultValue)
      Returns the value of the app setting, read from from app.settings or from the config file if app is root.
      Parameters:
      app - the app in which to look for these keys
      key - setting key
      defaultValue - default value
      Returns:
      the value of the configuration property as string
    • elasticsearchFlavor

      public String elasticsearchFlavor()
    • elasticsearchRootIndexShards

      public int elasticsearchRootIndexShards()
    • elasticsearchChildIndexShards

      public int elasticsearchChildIndexShards()
    • elasticsearchRootIndexReplicas

      public int elasticsearchRootIndexReplicas()
    • elasticsearchChildIndexReplicas

      public int elasticsearchChildIndexReplicas()
    • elasticsearchNestedModeEnabled

      public boolean elasticsearchNestedModeEnabled()
    • elasticsearchAsyncModeEnabled

      public boolean elasticsearchAsyncModeEnabled()
    • elasticsearchBulkFlushEnabled

      public boolean elasticsearchBulkFlushEnabled()
    • elasticsearchRestClientScheme

      public String elasticsearchRestClientScheme()
    • elasticsearchRestClientHost

      public String elasticsearchRestClientHost()
    • elasticsearchRestClientPort

      public int elasticsearchRestClientPort()
    • elasticsearchSignRequestsForAwsEnabled

      public boolean elasticsearchSignRequestsForAwsEnabled()
    • elasticsearchRestClientContextPath

      public String elasticsearchRestClientContextPath()
    • elasticsearchAutoExpandReplicas

      public String elasticsearchAutoExpandReplicas()
    • elasticsearchRootIndexSharingEnabled

      public boolean elasticsearchRootIndexSharingEnabled()
    • elasticsearchTrackTotalHits

      public String elasticsearchTrackTotalHits()
    • elasticsearchAwsRegion

      public String elasticsearchAwsRegion()
    • elasticsearchAuthUser

      public String elasticsearchAuthUser()
    • elasticsearchAuthPassword

      public String elasticsearchAuthPassword()
    • elasticsearchBulkSizeLimitMb

      public int elasticsearchBulkSizeLimitMb()
    • elasticsearchBulkActionLimit

      public int elasticsearchBulkActionLimit()
    • elasticsearchBulkConcurrentRequests

      public int elasticsearchBulkConcurrentRequests()
    • elasticsearchBulkFlushIntervalSec

      public int elasticsearchBulkFlushIntervalSec()
    • elasticsearchBulkBackoffDelayMs

      public int elasticsearchBulkBackoffDelayMs()
    • elasticsearchBulkBackoffRetries

      public int elasticsearchBulkBackoffRetries()
    • elasticsearchProxyEnabled

      public boolean elasticsearchProxyEnabled()
    • elasticsearchProxyPath

      public String elasticsearchProxyPath()
    • elasticsearchProxyReindexingEnabled

      public boolean elasticsearchProxyReindexingEnabled()
    • luceneDataFolder

      public String luceneDataFolder()
    • mongoConnectionUri

      public String mongoConnectionUri()
    • mongoDatabase

      public String mongoDatabase()
    • mongoHost

      public String mongoHost()
    • mongoPort

      public int mongoPort()
    • mongoAuthUser

      public String mongoAuthUser()
    • mongoAuthPassword

      public String mongoAuthPassword()
    • mongoSslEnabled

      public boolean mongoSslEnabled()
    • mongoSslAllowAll

      public boolean mongoSslAllowAll()
    • h2Host

      public String h2Host()
    • h2DataFolder

      public String h2DataFolder()
    • h2User

      public String h2User()
    • h2Password

      public String h2Password()
    • h2ServerParameters

      public String h2ServerParameters()
    • sqlHostUrl

      public String sqlHostUrl()
    • sqlDriver

      public String sqlDriver()
    • sqlUser

      public String sqlUser()
    • sqlPassword

      public String sqlPassword()
    • cassandraHosts

      public String cassandraHosts()
    • cassandraKeyspace

      public String cassandraKeyspace()
    • cassandraUser

      public String cassandraUser()
    • cassandraPassword

      public String cassandraPassword()
    • cassandraPort

      public int cassandraPort()
    • cassandraReplicationFactor

      public int cassandraReplicationFactor()
    • cassandraSslEnabled

      public boolean cassandraSslEnabled()
    • cassandraSslProtocols

      public String cassandraSslProtocols()
    • cassandraSslKeystore

      public String cassandraSslKeystore()
    • cassandraSslKeystorePassword

      public String cassandraSslKeystorePassword()
    • cassandraTruststore

      public String cassandraTruststore()
    • cassandraTruststorePassword

      public String cassandraTruststorePassword()
    • awsDynamoEncryptionEnabled

      public boolean awsDynamoEncryptionEnabled()
    • awsDynamoReplicaRegions

      public String awsDynamoReplicaRegions()
    • awsDynamoBackupsEnabled

      public boolean awsDynamoBackupsEnabled()
    • awsDynamoProvisionedBillingEnabled

      public boolean awsDynamoProvisionedBillingEnabled()
    • awsDynamoMaxInitialReadCapacity

      public int awsDynamoMaxInitialReadCapacity()
    • awsDynamoMaxInitialWriteCapacity

      public int awsDynamoMaxInitialWriteCapacity()
    • caffeineEvictAfterMin

      public int caffeineEvictAfterMin()
    • caffeineCacheSize

      public long caffeineCacheSize()
    • hazelcastAsyncEnabled

      public boolean hazelcastAsyncEnabled()
    • hazelcastTtlSec

      public int hazelcastTtlSec()
    • hazelcastEc2DiscoveryEnabled

      public boolean hazelcastEc2DiscoveryEnabled()
    • hazelcastAwsAccessKey

      public String hazelcastAwsAccessKey()
    • hazelcastAwsSecretKey

      public String hazelcastAwsSecretKey()
    • hazelcastAwsRegion

      public String hazelcastAwsRegion()
    • hazelcastEc2DiscoveryGroup

      public String hazelcastEc2DiscoveryGroup()
    • hazelcastMaxCacheSize

      public int hazelcastMaxCacheSize()
    • hazelcastEvictionPolicy

      public String hazelcastEvictionPolicy()
    • maxItemsPerPage

      public int maxItemsPerPage()
    • maxPages

      public int maxPages()
    • maxPageLimit

      public int maxPageLimit()
    • accessLogEnabled

      public boolean accessLogEnabled()
    • sharedTableName

      public String sharedTableName()
    • exceptionOnWriteErrorsEnabled

      public boolean exceptionOnWriteErrorsEnabled()
    • importBatchSize

      public int importBatchSize()
    • gzipEnabled

      public boolean gzipEnabled()
    • debugRequestSignaturesEnabled

      public boolean debugRequestSignaturesEnabled()
    • voteExpiresAfterSec

      public int voteExpiresAfterSec()
    • voteLockedAfterSec

      public int voteLockedAfterSec()
    • pluginFolder

      public String pluginFolder()
    • appIdSpacePrefixEnabled

      public boolean appIdSpacePrefixEnabled()
    • versionBannerEnabled

      public boolean versionBannerEnabled()
    • logoBannerEnabled

      public boolean logoBannerEnabled()
    • markdownSoftBreak

      public String markdownSoftBreak()
    • markdownAllowFollowDomains

      public String[] markdownAllowFollowDomains()
    • awsSesRegion

      public String awsSesRegion()
    • pidFileEnabled

      public boolean pidFileEnabled()
    • separator

      public String separator()
    • defaultEncoding

      public String defaultEncoding()
    • inDevelopment

      public boolean inDevelopment()
      Returns:
      Development environment flag.
    • inProduction

      public boolean inProduction()
      Returns:
      Production environment flag.
    • getRootAppIdentifier

      public String getRootAppIdentifier()
      Returns:
      The name of the root Para app, without any spaces.