java.lang.Object
com.erudika.para.core.utils.Config
com.erudika.para.core.utils.ParaConfig
-
Field Summary
Fields inherited from class com.erudika.para.core.utils.Config
_APPID, _CREATORID, _EMAIL, _EMAIL_TOKEN, _GROUPS, _ID, _IDENTIFIER, _KEY, _NAME, _PARENTID, _PASSWORD, _PROPERTIES, _RESET_TOKEN, _TAGS, _TIMESTAMP, _TYPE, _UPDATED, _VERSION, AMAZON_PREFIX, DEFAULT_LIMIT, FB_PREFIX, GITHUB_PREFIX, GPLUS_PREFIX, LDAP_PREFIX, LINKEDIN_PREFIX, MATTERMOST_PREFIX, MICROSOFT_PREFIX, OAUTH2_PREFIX, OAUTH2_SECOND_PREFIX, OAUTH2_THIRD_PREFIX, PARA, PASSWORDLESS_PREFIX, SAML_PREFIX, SLACK_PREFIX, TWITTER_PREFIX
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
boolean
boolean
appName()
Deprecated.boolean
boolean
int
int
boolean
awsS3Bucket
(String region) int
long
int
int
int
boolean
boolean
boolean
boolean
boolean
boolean
int
int
int
int
boolean
int
int
int
int
boolean
boolean
boolean
int
int
int
boolean
boolean
boolean
int
The root prefix of the configuration property names, e.g.getLdapSettingsForApp
(App app) Returns a map of LDAP configuration properties for a given app, read from app.settings or config file.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.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.int
boolean
h2Host()
h2User()
boolean
boolean
int
int
boolean
int
int
com.typesafe.config.ConfigList
int
boolean
boolean
boolean
boolean
int
int
int
boolean
String[]
int
int
int
int
int
int
maxPages()
int
boolean
int
int
boolean
int
int
int
boolean
boolean
int
int
boolean
com.typesafe.config.ConfigObject
boolean
int
int
boolean
int
reindexBatchSize
(int max) boolean
Deprecated.int
int
int
int
sqlUser()
boolean
boolean
int
int
boolean
workerId()
Methods inherited from class com.erudika.para.core.utils.Config
getConfig, getConfigFilePath, getConfigMap, getConfigValue, getSortedConfigKeys, parseFileWithoutIncludes, parseStringWithoutIncludes, render, render, renderConfigDocumentation, store
-
Constructor Details
-
ParaConfig
public ParaConfig()
-
-
Method Details
-
getConfigRootPrefix
Description copied from class:Config
The root prefix of the configuration property names, e.g. "para".- Specified by:
getConfigRootPrefix
in classConfig
- Returns:
- the root prefix for all config property keys.
-
appName
- Returns:
- The name of the default application.
-
serverContextPath
-
serverPort
public int serverPort() -
environment
-
daoPlugin
-
searchPlugin
-
cachePlugin
-
queuePlugin
-
fileStoragePlugin
-
emailerPlugin
-
isSearchEnabled
public boolean isSearchEnabled() -
isCacheEnabled
public boolean isCacheEnabled() -
webhooksEnabled
public boolean webhooksEnabled() -
apiEnabled
public boolean apiEnabled() -
clusterName
-
corePackageName
-
adminIdentifier
-
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
-
facebookSecret
-
googleAppId
-
googleSecret
-
linkedinAppId
-
linkedinSecret
-
twitterAppId
-
twitterSecret
-
githubAppId
-
githubSecret
-
microsoftAppId
-
microsoftSecret
-
microsoftTenantId
-
amazonAppId
-
amazonSecret
-
slackAppId
-
slackSecret
-
mattermostAppId
-
mattermostSecret
-
getOAuthKeysForApp
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 keysprefix
- a service prefix: "fb" for facebook, "tw" for twitter etc. SeeConfig
- Returns:
- an array ["app_id", "secret_key"] or ["", ""]
-
corsEnabled
public boolean corsEnabled() -
csrfProtectionEnabled
public boolean csrfProtectionEnabled() -
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
-
supportEmail
-
allowUnverifiedEmails
public boolean allowUnverifiedEmails() -
protectedPaths
public com.typesafe.config.ConfigObject protectedPaths() -
ignoredPaths
public com.typesafe.config.ConfigList ignoredPaths() -
signinPath
-
signinSuccessPath
-
signinFailurePath
-
signoutPath
-
signoutSuccessPath
-
accessDeniedPath
-
returnToPath
-
rememberMeEnabled
Deprecated. -
appSecretKey
Deprecated. -
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
-
metricsGraphitePort
public int metricsGraphitePort() -
metricsGraphitePrefixSystem
-
metricsGraphitePrefixApps
-
metricsGraphitePeriodSec
public int metricsGraphitePeriodSec() -
metricsJmxEnabled
public boolean metricsJmxEnabled() -
ldapPasswordParameter
-
ldapUsernameParameter
-
getLdapSettingsForApp
-
awsS3Bucket
-
awsS3MaxFileSizeMb
public int awsS3MaxFileSizeMb() -
localFileStoreFolder
-
localFileStoreMaxFileSizeMb
public int localFileStoreMaxFileSizeMb() -
clientSslProtocols
-
clientSslKeystore
-
clientSslKeystorePassword
-
clientSslTruststore
-
clientSslTruststorePassword
-
clientUserAgentEnabled
public boolean clientUserAgentEnabled() -
getSettingForApp
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 keyskey
- setting keydefaultValue
- default value- Returns:
- the value of the configuration property as 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
-
elasticsearchRestClientHost
-
elasticsearchRestClientPort
public int elasticsearchRestClientPort() -
elasticsearchSignRequestsForAwsEnabled
public boolean elasticsearchSignRequestsForAwsEnabled() -
elasticsearchRestClientContextPath
-
elasticsearchAutoExpandReplicas
-
elasticsearchRootIndexSharingEnabled
public boolean elasticsearchRootIndexSharingEnabled() -
elasticsearchTrackTotalHits
-
elasticsearchAwsRegion
-
elasticsearchAuthUser
-
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
-
elasticsearchProxyReindexingEnabled
public boolean elasticsearchProxyReindexingEnabled() -
luceneDataFolder
-
mongoConnectionUri
-
mongoDatabase
-
mongoHost
-
mongoPort
public int mongoPort() -
mongoAuthUser
-
mongoAuthPassword
-
mongoSslEnabled
public boolean mongoSslEnabled() -
mongoSslAllowAll
public boolean mongoSslAllowAll() -
h2Host
-
h2DataFolder
-
h2User
-
h2Password
-
h2ServerParameters
-
sqlHostUrl
-
sqlDriver
-
sqlUser
-
sqlPassword
-
cassandraHosts
-
cassandraKeyspace
-
cassandraUser
-
cassandraPassword
-
cassandraPort
public int cassandraPort() -
cassandraReplicationFactor
public int cassandraReplicationFactor() -
cassandraSslEnabled
public boolean cassandraSslEnabled() -
cassandraSslProtocols
-
cassandraSslKeystore
-
cassandraSslKeystorePassword
-
cassandraTruststore
-
cassandraTruststorePassword
-
awsDynamoEncryptionEnabled
public boolean awsDynamoEncryptionEnabled() -
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
-
hazelcastAwsSecretKey
-
hazelcastAwsRegion
-
hazelcastEc2DiscoveryGroup
-
hazelcastMaxCacheSize
public int hazelcastMaxCacheSize() -
hazelcastEvictionPolicy
-
maxItemsPerPage
public int maxItemsPerPage() -
maxPages
public int maxPages() -
maxPageLimit
public int maxPageLimit() -
accessLogEnabled
public boolean accessLogEnabled() -
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
-
appIdSpacePrefixEnabled
public boolean appIdSpacePrefixEnabled() -
versionBannerEnabled
public boolean versionBannerEnabled() -
logoBannerEnabled
public boolean logoBannerEnabled() -
markdownSoftBreak
-
markdownAllowFollowDomains
-
awsSesRegion
-
pidFileEnabled
public boolean pidFileEnabled() -
separator
-
defaultEncoding
-
inDevelopment
public boolean inDevelopment()- Returns:
- Development environment flag.
-
inProduction
public boolean inProduction()- Returns:
- Production environment flag.
-
getRootAppIdentifier
- Returns:
- The name of the root Para app, without any spaces.
-