Class ParaConfig
java.lang.Object
com.erudika.para.core.utils.Config
com.erudika.para.core.utils.ParaConfig
Para configuration.
- Author:
- Alex Bogdanovski [[email protected]]
-
Field Summary
Fields inherited from class 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe path to redirect to when 403 code is returned.booleanEnable/disable the Para access log.The identifier of the first administrator (can be email or social login ID).booleanEnable/disable email verification after the initial user registration.Amazon OAuth2 app ID.Amazon app secret key.booleanEnable/disable the Para RESTful API.boolean**For internal use only!appName()Returns the name of the default application.Deprecated.The name of the authorization cookie.booleanEnable/disable point-in-time backups in DynamoDB.booleanEnable/disable SSE (encryption-at-rest) using own KMS, instead of AWS-owned CMK for all newly created DynamoDB tables.intThe maximum read capacity when creating a table with provisioned mode enabled.intThe maximum write capacity when creating a table with provisioned mode enabled.booleanEnable/disable provisioned billing as an alternative to on-demand billing in DynamoDB.Toggles global table settings for the specified regions.awsS3Bucket(String region) The S3 bucket where files will be stored by `FileStore` implementations.intMaximum file size for files uploaded to S3, in megabytes.AWS region to use in the `AWSEmailer` implementation.Selects the `Cache` implementation at runtime.longMaximum size for the Caffeine cache map.intCache eviction policy - objects are evicted from Caffeine cache after this time.Comma-separated Cassandra server hosts (contact points).The name of the Cassandra keyspace to use.The password for the Cassandra user.intThe Cassandra server port to connect to.intReplication factor for the Cassandra keyspace.booleanEnable/disable the SSL/TLS transport in Cassandra client.Cassandra client key store, containing the certificates to use.Password for the Cassandra client key store.The protocols allowed for successful connection to Cassandra cluster.Cassandra client trust store, containing trusted certificates and CAs.Password for the Cassandra trust store.The Cassandra username with access to the database.The SSL key store location.The SSL key store password.SSL protocols allowed for a successul connection.The SSL trust store location.The SSL trust store password.booleanEnable/disable `User-Agent` header in Para client.The name of the Para cluster.Deprecated.booleanEnable/disable the CORS filter.booleanEnable/disable CSRF protection which checks for valid CSRF tokens in write requests.booleanEnable/disable CSRF protection with single-page application mode enabled.Selects the `DAO` implementation at runtime.booleanEnable/disable debuging info for each AWS V4 request signature.Default character encoding - `UTF-8`.Returns the default queue name which will be polled for incoming JSON messages.booleanEnable/disable asynchronous operations when indexing/unindexing.The password to use for authentication with ES.The username to use for authentication with ES.Automatically make a replica copy of the index to the number of nodes specified.The AWS region where ES is deployed.int`BulkProcessor` flush threshold in terms of batch size.int`BulkProcessor` inital backoff delay, in milliseconds.int`BulkProcessor` number of retries.int`BulkProcessor` number of concurrent requests (0 means synchronous execution).booleanEanble/disable immediately flushing the requests in `BulkProcessor`, concurrently (in another thread).int`BulkProcessor` flush interval, in milliseconds.int`BulkProcessor` flush threshold, in megabytes.intThe number of copies to store of each child app index.intThe number of shards per index for a child apps.Eleasticsearch flavor - either `elasticsearch` or `opensearch`.booleanSwitches between normal indexing and indexing with nested key/value objects for custom properties.booleanEnable/disable the Elasticsearch proxy endpoint.The path to the ES proxy endpoint.booleanEnable/disable rebuilding indices through the Elasticsearch proxy endpoint.The context path where ES is deployed, if any.The ES server hostname.intThe ES server port number.The scheme to use when connecting to the Elasticsearch server - `http` or `https`.intThe number of copies to store of the root index.intThe number of shards per index.booleanEnable/disable root index sharing by child apps configured with `isSharingIndex = true`.booleanEnable/disable request signing using the AWS V4 algorithm.Makes ES track the actual number of hits, even if they are more than the 10000.Selects the `Emailer` implementation at runtime.Enables/disables certain features, depending on the environment.booleanEnable/disable throwing an exception when a write operation fails with errors.booleanThe number of threads to use for the `ExecutorService` thread pool.intThe number of threads to use for the `ExecutorService` thread pool.Facebook OAuth2 app ID.Facebook app secret key.Selects the `FileStore` implementation at runtime.The configuration root prefix.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.Returns the name of the root Para app, without any spaces.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.GitHub OAuth2 app ID.GitHub app secret key.intThe time interval between the sending of each batch of index synchronization messages to the queue, in seconds.Google OAuth2 app ID.Google app secret key.booleanEnable/disable the GZIP filter for compressing API response entities.The data directory for storing H2 databases.h2Host()The hostname of the H2 server.The password of the H2 user.Parameters for the H2 TCP server.h2User()The username with access to the H2 database.booleanEnable/disable asynchronous operations in the Hazelcast client.The AWS access key to use if EC2 auto-discovery is enabled in Hazelcast.The AWS region to use if EC2 auto-discovery is enabled in Hazelcast.The AWS secret key to use if EC2 auto-discovery is enabled in Hazelcast.booleanEnable/disable EC2 auto-discovery feature when deploying to AWS.EC2 security group for cloud discovery of Hazelcast nodes.Hazelcast cache eviction policy - `LRU` or `LFU`.intMaximum number of objects to keep in Hazelcast cache.intTime-to-live value (how long the objects stay cached) for cached objects, in seconds.booleanEnable/disable the health check functionality in Para.intThe health check interval, in seconds.intExpiration period for short-lived ID tokens, in seconds.com.typesafe.config.ConfigListA list of ignored paths which will not require authentication before accessing.intThe maximum number of objects to import, in each batch, when restoring data from backup.booleanReturns true if the environment is "development".booleanReturns true if the environment is "production".booleanEnable/disable object caching.booleanEnable/disable full-text search functionality.intExpiration period for JWTs (access token), in seconds.intJWT refresh interval, after which a new token is issued, in seconds.booleanEnable/disable the landing page when opening the server address in the browser.LDAP password parameter name.LDAP username parameter name.LinkedIn OAuth2 app ID.LinkedIn app secret key.The local folder for file storage, when `LocalFileStore` is used.intMaximum file size for files stored locally, in megabytes.booleanEnable/disable printing the Para ASCII logo on startup.The data folder where Lucene stores its indexes.String[]A whitelist of domains, links to which will be allowed to be followed by web crawlers (comma-separated list).Sets the Markdown soft break character.Mattermost OAuth2 app ID.Mattermost app secret key.intMaximum number of data types which can be defined in each Para app.intMaximum size (in bytes) of incoming JSON payload entities in requests to the API.intThe number of maximum failed webhook delivery attemts.intMaximum results per page - limits the number of items to show in search results.intPagination limit - sets the maximum value for the `limit` request parameter, when it is used.intmaxPages()Pagination limit - sets the highest page number possible.intThe maximum number of passord matching attempts for user accounts per time unit.Enable/disable the MCP server.booleanEnable/disable the built-in metrics around CRUD methods.The URL of the Graphite host to push metrics to.intThe period for how often to push system metrics in seconds.intThe port number of the Graphite server.The prefix to apply to metric names, e.g.The prefix to apply to system metric names.booleanEnable/disable JMX reporting for all metrics.intThe rate at which the metrics logger will write to file, in seconds.Microsoft OAuth2 app ID.Microsoft app secret key.Microsoft OAuth2 tenant ID.intThe minimum length of user passwords.The MongoDB user's password.The username with access to the MongoDB database.The MongoDB URI string - verrides host, port, user and password if set.The database name that Para will use.The hostname of the MongoDB server.intThe MongoDB server port.booleanAllows a connection to any host over SSL by ignoring the certificate validation.booleanEnable/disable the SSL/TLS transport layer.intThe time to force a user to wait until they can try to log back in, in hours.intThe time window in which passwords can be reset, in seconds.booleanEnable/disable PID file generation on startup.The folder from which Para will load its JAR plugin files.com.typesafe.config.ConfigObjectProtects a named resource by requiring users to authenticated before accessing it.Selects the `Queue` implementation at runtime.booleanEnable/disable polling the queue for message.intThe polling interval of the Para river, in seconds.intThe polling sleep time, in seconds.booleanEnable/disable reading data from search index instead of database.intreindexBatchSize(int max) Controls the number of documents to reindex in a single batch.booleanDeprecated.Returns the list of regions where a table should be replicated (global table).intExpiration period for signed API request, in seconds.The name of the cookie used to remember which URL the user requested and will be redirected to after login.The path to return to when an authentication request succeeds.intThe maximum number of attempts at reading an object from database and indexing it, when the operation was received from the queue.Overrides the secret key for the root Para app `app:para` once, upon first initialization.Selects the `Search` implementation at runtime.String separator - default is colon `:`.The context path (subpath) of the web application, defaults to the root path `/`.intThe network port of this Para server.intExpiration period for the login session, in seconds.The name of the shared database table, used by shared apps.The default page to send users to when login fails.The path to the login page.The default page to send users to when they login.The path to the logout page.The default page to send users to when they logout.Slack OAuth2 app ID.Slack app secret key.The fully-qualified class name for your SQL driver.The server URL to connect to, *without* the `jdbc:` prefix.The database user's password.sqlUser()The username with access to the database.The email of the webmaster/support team.booleanEnable/disable the data synchronization between database and search index.Twitter OAuth app ID.Twitter app secret key.booleanEnable/disable version number printing in Para logs.intVote expiration timeout, in seconds.intVote locking period, in seconds.booleanEnable/disable webhooks functionality using `Webhook` objects.workerId()Node number, 1 to 128.Methods inherited from class Config
getConfig, getConfigFilePath, getConfigMap, getConfigValue, getSortedConfigKeys, isSensitiveData, load, overwriteConfig, parseFileWithoutIncludes, parseStringWithoutIncludes, render, render, renderConfigDocumentation, store
-
Constructor Details
-
ParaConfig
public ParaConfig()No-args constructor.
-
-
Method Details
-
getConfigRootPrefix
The configuration root prefix.- Specified by:
getConfigRootPrefixin classConfig- Returns:
- PARA
-
appName
Returns the name of the default application.- Returns:
- The name of the default application.
-
rootSecretOverride
Overrides the secret key for the root Para app `app:para` once, upon first initialization.- Returns:
- the secret key override
-
serverContextPath
The context path (subpath) of the web application, defaults to the root path `/`.- Returns:
- the context path
-
serverPort
public int serverPort()The network port of this Para server. Port number should be a number above `1024`.- Returns:
- the server port
-
environment
Enables/disables certain features, depending on the environment. Can be one of `production`, `development” or `embedded`.- Returns:
- the environment name
-
daoPlugin
Selects the `DAO` implementation at runtime. Can be `AWSDynamoDAO`, `MongoDBDAO`, `CassandraDAO`, etc. Each implementation has its own configuration properties.- Returns:
- the DAO plugin name
-
searchPlugin
Selects the `Search` implementation at runtime. Can be `LuceneSearch`, `ElasticSearch`, etc.- Returns:
- the search plugin name
-
cachePlugin
Selects the `Cache` implementation at runtime. Can be one of `CaffeineSearch`, `HazelcastCache`.- Returns:
- the cache plugin name
-
queuePlugin
Selects the `Queue` implementation at runtime. Can be one of `LocalQueue`, `AWSQueue`.- Returns:
- the queue plugin name
-
fileStoragePlugin
Selects the `FileStore` implementation at runtime. Can be one of `LocalFileStore`, `AWSFileStore`.- Returns:
- the file storage plugin name
-
emailerPlugin
Selects the `Emailer` implementation at runtime. Can be one of `AWSEmailer`, `JavaMailEmailer`, `NoopEmailer`.- Returns:
- the emailer plugin name
-
isSearchEnabled
public boolean isSearchEnabled()Enable/disable full-text search functionality.- Returns:
- true if search is enabled
-
isCacheEnabled
public boolean isCacheEnabled()Enable/disable object caching. Enabled in `production` mode by default.- Returns:
- true if cache is enabled
-
webhooksEnabled
public boolean webhooksEnabled()Enable/disable webhooks functionality using `Webhook` objects. Requires a queue.- Returns:
- true if webhooks are enabled
-
apiEnabled
public boolean apiEnabled()Enable/disable the Para RESTful API.- Returns:
- true if API is enabled
-
clusterName
The name of the Para cluster. Used by some of the plugins to isolate deployments.- Returns:
- the cluster name
-
corePackageName
Deprecated.The package path (e.g. `org.company.app.core`) where all domain classes are defined. Specify this when integrating your app with Para core/client, to get deserialization working.- Returns:
- the core package name
-
adminIdentifier
The identifier of the first administrator (can be email or social login ID).- Returns:
- the admin identifier
-
workerId
Node number, 1 to 128. Used mainly for ID generation. Each instance of Para should have a unique worker id.- Returns:
- the worker id
-
executorThreads
public int executorThreads()The number of threads to use for the `ExecutorService` thread pool.- Returns:
- the number of executor threads
-
executorServiceEnabled
public boolean executorServiceEnabled()The number of threads to use for the `ExecutorService` thread pool.- Returns:
- the number of executor threads
-
maxFailedWebhookAttempts
public int maxFailedWebhookAttempts()The number of maximum failed webhook delivery attemts. Webhooks with too many failed deliveries will be disabled automatically.- Returns:
- the maximum failed webhook attempts
-
reindexBatchSize
public int reindexBatchSize(int max) Controls the number of documents to reindex in a single batch. By default is equal to page size for reading the docs from DB.- Parameters:
max- the default batch size- Returns:
- the reindex batch size
-
syncIndexWithDatabaseEnabled
public boolean syncIndexWithDatabaseEnabled()Enable/disable the data synchronization between database and search index.- Returns:
- true if sync is enabled
-
readFromIndexEnabled
public boolean readFromIndexEnabled()Enable/disable reading data from search index instead of database. Used for data recovery.- Returns:
- true if reading from index is enabled
-
maxDatatypesPerApp
public int maxDatatypesPerApp()Maximum number of data types which can be defined in each Para app.- Returns:
- the maximum data types per app
-
maxEntitySizeBytes
public int maxEntitySizeBytes()Maximum size (in bytes) of incoming JSON payload entities in requests to the API.- Returns:
- the maximum entity size in bytes
-
healthCheckInvervalSec
public int healthCheckInvervalSec()The health check interval, in seconds.- Returns:
- the health check interval
-
healthCheckEnabled
public boolean healthCheckEnabled()Enable/disable the health check functionality in Para.- Returns:
- true if health check is enabled
-
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()Enable/disable the CORS filter. It adds CORS headers to API responses.- Returns:
- true if CORS is enabled
-
csrfProtectionEnabled
public boolean csrfProtectionEnabled()Enable/disable CSRF protection which checks for valid CSRF tokens in write requests.- Returns:
- true if CSRF protection is enabled
-
csrfProtectionWithSpaEnabled
public boolean csrfProtectionWithSpaEnabled()Enable/disable CSRF protection with single-page application mode enabled.- Returns:
- true if CSRF protection with SPA is enabled
-
authCookieName
-
requestExpiresAfterSec
public int requestExpiresAfterSec()Expiration period for signed API request, in seconds.- Returns:
- the request expiration period
-
jwtExpiresAfterSec
public int jwtExpiresAfterSec()Expiration period for JWTs (access token), in seconds.- Returns:
- the JWT expiration period
-
jwtRefreshIntervalSec
public int jwtRefreshIntervalSec()JWT refresh interval, after which a new token is issued, in seconds.- Returns:
- the JWT refresh interval
-
idTokenExpiresAfterSec
public int idTokenExpiresAfterSec()Expiration period for short-lived ID tokens, in seconds.- Returns:
- the ID token expiration period
-
sessionTimeoutSec
public int sessionTimeoutSec()Expiration period for the login session, in seconds.- Returns:
- the session timeout
-
minPasswordLength
public int minPasswordLength()The minimum length of user passwords.- Returns:
- the min password length
-
passwordResetTimeoutSec
public int passwordResetTimeoutSec()The time window in which passwords can be reset, in seconds. After that the token in the email expires.- Returns:
- the password reset timeout
-
maxPasswordMatchingAttempts
public int maxPasswordMatchingAttempts()The maximum number of passord matching attempts for user accounts per time unit. After that the account is locked and user cannot login until the lock has expired.- Returns:
- the max password matching attempts
-
passwordMatchingLockPeriodHours
public int passwordMatchingLockPeriodHours()The time to force a user to wait until they can try to log back in, in hours.- Returns:
- the password matching lock period in hours
-
returnToCookieName
The name of the cookie used to remember which URL the user requested and will be redirected to after login.- Returns:
- the return-to cookie name
-
supportEmail
The email of the webmaster/support team. Para will send emails to this email.- Returns:
- the support email address
-
allowUnverifiedEmails
public boolean allowUnverifiedEmails()Enable/disable email verification after the initial user registration. Users with unverified emails won't be able to sign in, unless they use a social login provider.- Returns:
- true if unverified emails are allowed
-
protectedPaths
public com.typesafe.config.ConfigObject protectedPaths()Protects a named resource by requiring users to authenticated before accessing it. A protected resource has a `{name}` and value like this `[\"/{path}\", \"/{path}/**\", [\"{role}\" or {http_method}]]`. The value is an array of relative paths which are matche by an ANT pattern matcher. This array can contain a subarray which lists all the HTTP methods that require authentication and the user roles that are allowed to access this particular resource. No HTTP methods means that all requests to this resource require authentication.- Returns:
- a configuration object for protected paths
-
ignoredPaths
public com.typesafe.config.ConfigList ignoredPaths()A list of ignored paths which will not require authentication before accessing. A list of paths like this `[\"/{path1}\", \"/{path2}/**\", ...]`.- Returns:
- a configuration list for ignored paths
-
signinPath
-
signinSuccessPath
The default page to send users to when they login.- Returns:
- the sign-in success path
-
signinFailurePath
The default page to send users to when login fails.- Returns:
- the sign-in failure path
-
signoutPath
-
signoutSuccessPath
The default page to send users to when they logout.- Returns:
- the sign-out success path
-
accessDeniedPath
The path to redirect to when 403 code is returned.- Returns:
- the access denied path
-
returnToPath
The path to return to when an authentication request succeeds.- Returns:
- the return-to path
-
rememberMeEnabled
Deprecated.Enable/disable remember me functionality.- Returns:
- true if remember me is enabled
-
appSecretKey
-
defaultQueueName
Returns the default queue name which will be polled for incoming JSON messages.- Returns:
- The default queue name which will be polled for incoming JSON messages.
-
queuePollingEnabled
public boolean queuePollingEnabled()Enable/disable polling the queue for message. This controls the 'river' feature in Para.- Returns:
- true if queue polling is enabled
-
queuePollingWaitSec
public int queuePollingWaitSec()The polling sleep time, in seconds.- Returns:
- the polling wait time
-
queuePollingIntervalSec
public int queuePollingIntervalSec()The polling interval of the Para river, in seconds. Polls queue for messages.- Returns:
- the polling interval
-
riverMaxIndexingRetries
public int riverMaxIndexingRetries()The maximum number of attempts at reading an object from database and indexing it, when the operation was received from the queue.- Returns:
- the max indexing retries
-
globalSyncIntervalSec
public int globalSyncIntervalSec()The time interval between the sending of each batch of index synchronization messages to the queue, in seconds.- Returns:
- the global sync interval
-
metricsEnabled
public boolean metricsEnabled()Enable/disable the built-in metrics around CRUD methods.- Returns:
- true if metrics are enabled
-
metricsLoggingIntervalSec
public int metricsLoggingIntervalSec()The rate at which the metrics logger will write to file, in seconds.- Returns:
- the metrics logging interval
-
metricsGraphiteHost
The URL of the Graphite host to push metrics to.- Returns:
- the Graphite host
-
metricsGraphitePort
public int metricsGraphitePort()The port number of the Graphite server.- Returns:
- the Graphite port
-
metricsGraphitePrefixSystem
The prefix to apply to system metric names.- Returns:
- the Graphite system prefix
-
metricsGraphitePrefixApps
The prefix to apply to metric names, e.g. `com.erudika.para.{{INSTANCE_ID}}`.- Returns:
- the Graphite apps prefix
-
metricsGraphitePeriodSec
public int metricsGraphitePeriodSec()The period for how often to push system metrics in seconds. Disabled by default.- Returns:
- the Graphite push period
-
metricsJmxEnabled
public boolean metricsJmxEnabled()Enable/disable JMX reporting for all metrics.- Returns:
- true if JMX reporting is enabled
-
ldapPasswordParameter
LDAP password parameter name.- Returns:
- the LDAP password parameter
-
ldapUsernameParameter
LDAP username parameter name.- Returns:
- the LDAP username parameter
-
getLdapSettingsForApp
-
awsS3Bucket
-
awsS3MaxFileSizeMb
public int awsS3MaxFileSizeMb()Maximum file size for files uploaded to S3, in megabytes.- Returns:
- the max file size in MB
-
localFileStoreFolder
The local folder for file storage, when `LocalFileStore` is used.- Returns:
- the local storage folder
-
localFileStoreMaxFileSizeMb
public int localFileStoreMaxFileSizeMb()Maximum file size for files stored locally, in megabytes.- Returns:
- the max local file size in MB
-
clientSslProtocols
SSL protocols allowed for a successul connection.- Returns:
- the allowed SSL protocols
-
clientSslKeystore
The SSL key store location. This contains the certificates used by the Para client.- Returns:
- the SSL key store location
-
clientSslKeystorePassword
The SSL key store password.- Returns:
- the SSL key store password
-
clientSslTruststore
The SSL trust store location. This contains the certificates and CAs which the client trusts.- Returns:
- the SSL trust store location
-
clientSslTruststorePassword
The SSL trust store password.- Returns:
- the SSL trust store password
-
clientUserAgentEnabled
public boolean clientUserAgentEnabled()Enable/disable `User-Agent` header in Para client.- Returns:
- true if User-Agent header is enabled
-
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
Eleasticsearch flavor - either `elasticsearch` or `opensearch`.- Returns:
- the ES flavor
-
elasticsearchRootIndexShards
public int elasticsearchRootIndexShards()The number of shards per index. Used when creating the root app index.- Returns:
- the root index shards
-
elasticsearchChildIndexShards
public int elasticsearchChildIndexShards()The number of shards per index for a child apps.- Returns:
- the child index shards
-
elasticsearchRootIndexReplicas
public int elasticsearchRootIndexReplicas()The number of copies to store of the root index.- Returns:
- the root index replicas
-
elasticsearchChildIndexReplicas
public int elasticsearchChildIndexReplicas()The number of copies to store of each child app index.- Returns:
- the child index replicas
-
elasticsearchNestedModeEnabled
public boolean elasticsearchNestedModeEnabled()Switches between normal indexing and indexing with nested key/value objects for custom properties. When this is `false` (normal mode), Para objects will be indexed without modification but this could lead to a field mapping explosion and crash the ES cluster.- Returns:
- true if nested mode is enabled
-
elasticsearchAsyncModeEnabled
public boolean elasticsearchAsyncModeEnabled()Enable/disable asynchronous operations when indexing/unindexing.- Returns:
- true if async mode is enabled
-
elasticsearchBulkFlushEnabled
public boolean elasticsearchBulkFlushEnabled()Eanble/disable immediately flushing the requests in `BulkProcessor`, concurrently (in another thread).- Returns:
- true if bulk flush is enabled
-
elasticsearchRestClientScheme
The scheme to use when connecting to the Elasticsearch server - `http` or `https`.- Returns:
- the REST client scheme
-
elasticsearchRestClientHost
-
elasticsearchRestClientPort
public int elasticsearchRestClientPort()The ES server port number.- Returns:
- the REST client port
-
elasticsearchSignRequestsForAwsEnabled
public boolean elasticsearchSignRequestsForAwsEnabled()Enable/disable request signing using the AWS V4 algorithm. For use with Amazon OpenSearch.- Returns:
- true if request signing is enabled
-
elasticsearchRestClientContextPath
The context path where ES is deployed, if any.- Returns:
- the REST client context path
-
elasticsearchAutoExpandReplicas
Automatically make a replica copy of the index to the number of nodes specified.- Returns:
- the auto expand replicas setting
-
elasticsearchRootIndexSharingEnabled
public boolean elasticsearchRootIndexSharingEnabled()Enable/disable root index sharing by child apps configured with `isSharingIndex = true`.- Returns:
- true if root index sharing is enabled
-
elasticsearchTrackTotalHits
Makes ES track the actual number of hits, even if they are more than the 10000.- Returns:
- true if tracking total hits
-
elasticsearchAwsRegion
The AWS region where ES is deployed. Used for calculating request signatures.- Returns:
- the AWS region for ES
-
elasticsearchAuthUser
The username to use for authentication with ES.- Returns:
- the ES auth user
-
elasticsearchAuthPassword
The password to use for authentication with ES.- Returns:
- the ES auth password
-
elasticsearchBulkSizeLimitMb
public int elasticsearchBulkSizeLimitMb()`BulkProcessor` flush threshold, in megabytes.- Returns:
- the ES bulk size limit in MB
-
elasticsearchBulkActionLimit
public int elasticsearchBulkActionLimit()`BulkProcessor` flush threshold in terms of batch size.- Returns:
- the ES bulk action limit
-
elasticsearchBulkConcurrentRequests
public int elasticsearchBulkConcurrentRequests()`BulkProcessor` number of concurrent requests (0 means synchronous execution).- Returns:
- the ES bulk concurrent requests
-
elasticsearchBulkFlushIntervalSec
public int elasticsearchBulkFlushIntervalSec()`BulkProcessor` flush interval, in milliseconds.- Returns:
- the ES bulk flush interval
-
elasticsearchBulkBackoffDelayMs
public int elasticsearchBulkBackoffDelayMs()`BulkProcessor` inital backoff delay, in milliseconds.- Returns:
- the ES bulk backoff delay
-
elasticsearchBulkBackoffRetries
public int elasticsearchBulkBackoffRetries()`BulkProcessor` number of retries.- Returns:
- the ES bulk backoff retries
-
elasticsearchProxyEnabled
public boolean elasticsearchProxyEnabled()Enable/disable the Elasticsearch proxy endpoint.- Returns:
- true if ES proxy is enabled
-
elasticsearchProxyPath
The path to the ES proxy endpoint.- Returns:
- the ES proxy path
-
elasticsearchProxyReindexingEnabled
public boolean elasticsearchProxyReindexingEnabled()Enable/disable rebuilding indices through the Elasticsearch proxy endpoint.- Returns:
- true if ES proxy reindexing is enabled
-
luceneDataFolder
The data folder where Lucene stores its indexes.- Returns:
- the Lucene data folder
-
mongoConnectionUri
The MongoDB URI string - verrides host, port, user and password if set.- Returns:
- the MongoDB connection URI
-
mongoDatabase
The database name that Para will use. The database should exist before starting Para.- Returns:
- the MongoDB database name
-
mongoHost
-
mongoPort
public int mongoPort()The MongoDB server port.- Returns:
- the MongoDB port
-
mongoAuthUser
The username with access to the MongoDB database.- Returns:
- the MongoDB auth user
-
mongoAuthPassword
-
mongoSslEnabled
public boolean mongoSslEnabled()Enable/disable the SSL/TLS transport layer.- Returns:
- true if MongoDB SSL is enabled
-
mongoSslAllowAll
public boolean mongoSslAllowAll()Allows a connection to any host over SSL by ignoring the certificate validation.- Returns:
- true if all MongoDB SSL certificates are allowed
-
h2Host
The hostname of the H2 server. Setting this will enable H2’s “server mode” and start a TCP server.- Returns:
- the H2 host
-
h2DataFolder
The data directory for storing H2 databases.- Returns:
- the H2 data folder
-
h2User
-
h2Password
-
h2ServerParameters
Parameters for the H2 TCP server.- Returns:
- the H2 server parameters
-
sqlHostUrl
The server URL to connect to, *without* the `jdbc:` prefix.- Returns:
- the SQL host URL
-
sqlDriver
The fully-qualified class name for your SQL driver.- Returns:
- the SQL driver class name
-
sqlUser
-
sqlPassword
-
cassandraHosts
Comma-separated Cassandra server hosts (contact points).- Returns:
- the Cassandra hosts
-
cassandraKeyspace
The name of the Cassandra keyspace to use.- Returns:
- the Cassandra keyspace
-
cassandraUser
The Cassandra username with access to the database.- Returns:
- the Cassandra user
-
cassandraPassword
The password for the Cassandra user.- Returns:
- the Cassandra password
-
cassandraPort
public int cassandraPort()The Cassandra server port to connect to.- Returns:
- the Cassandra port
-
cassandraReplicationFactor
public int cassandraReplicationFactor()Replication factor for the Cassandra keyspace.- Returns:
- the Cassandra replication factor
-
cassandraSslEnabled
public boolean cassandraSslEnabled()Enable/disable the SSL/TLS transport in Cassandra client.- Returns:
- true if Cassandra SSL is enabled
-
cassandraSslProtocols
The protocols allowed for successful connection to Cassandra cluster.- Returns:
- the Cassandra SSL protocols
-
cassandraSslKeystore
Cassandra client key store, containing the certificates to use.- Returns:
- the Cassandra SSL key store
-
cassandraSslKeystorePassword
Password for the Cassandra client key store.- Returns:
- the Cassandra SSL key store password
-
cassandraTruststore
Cassandra client trust store, containing trusted certificates and CAs.- Returns:
- the Cassandra trust store
-
cassandraTruststorePassword
Password for the Cassandra trust store.- Returns:
- the Cassandra trust store password
-
awsDynamoEncryptionEnabled
public boolean awsDynamoEncryptionEnabled()Enable/disable SSE (encryption-at-rest) using own KMS, instead of AWS-owned CMK for all newly created DynamoDB tables.- Returns:
- true if encryption is enabled
-
awsDynamoReplicaRegions
Toggles global table settings for the specified regions.- Returns:
- the replica regions
-
awsDynamoBackupsEnabled
public boolean awsDynamoBackupsEnabled()Enable/disable point-in-time backups in DynamoDB.- Returns:
- true if DynamoDB backups are enabled
-
awsDynamoProvisionedBillingEnabled
public boolean awsDynamoProvisionedBillingEnabled()Enable/disable provisioned billing as an alternative to on-demand billing in DynamoDB.- Returns:
- true if provisioned billing is enabled
-
awsDynamoMaxInitialReadCapacity
public int awsDynamoMaxInitialReadCapacity()The maximum read capacity when creating a table with provisioned mode enabled.- Returns:
- the initial read capacity
-
awsDynamoMaxInitialWriteCapacity
public int awsDynamoMaxInitialWriteCapacity()The maximum write capacity when creating a table with provisioned mode enabled.- Returns:
- the initial write capacity
-
caffeineEvictAfterMin
public int caffeineEvictAfterMin()Cache eviction policy - objects are evicted from Caffeine cache after this time.- Returns:
- the eviction timeout in minutes
-
caffeineCacheSize
public long caffeineCacheSize()Maximum size for the Caffeine cache map.- Returns:
- the maximum cache size
-
hazelcastAsyncEnabled
public boolean hazelcastAsyncEnabled()Enable/disable asynchronous operations in the Hazelcast client.- Returns:
- true if Hazelcast async is enabled
-
hazelcastTtlSec
public int hazelcastTtlSec()Time-to-live value (how long the objects stay cached) for cached objects, in seconds.- Returns:
- the Hazelcast TTL in seconds
-
hazelcastEc2DiscoveryEnabled
public boolean hazelcastEc2DiscoveryEnabled()Enable/disable EC2 auto-discovery feature when deploying to AWS.- Returns:
- true if EC2 discovery is enabled
-
hazelcastAwsAccessKey
The AWS access key to use if EC2 auto-discovery is enabled in Hazelcast.- Returns:
- the AWS access key
-
hazelcastAwsSecretKey
The AWS secret key to use if EC2 auto-discovery is enabled in Hazelcast.- Returns:
- the AWS secret key
-
hazelcastAwsRegion
The AWS region to use if EC2 auto-discovery is enabled in Hazelcast.- Returns:
- the AWS region
-
hazelcastEc2DiscoveryGroup
EC2 security group for cloud discovery of Hazelcast nodes.- Returns:
- the discovery group name
-
hazelcastMaxCacheSize
public int hazelcastMaxCacheSize()Maximum number of objects to keep in Hazelcast cache.- Returns:
- the maximum cache size
-
hazelcastEvictionPolicy
Hazelcast cache eviction policy - `LRU` or `LFU`.- Returns:
- the eviction policy
-
maxItemsPerPage
public int maxItemsPerPage()Maximum results per page - limits the number of items to show in search results.- Returns:
- the maximum items per page
-
maxPages
public int maxPages()Pagination limit - sets the highest page number possible.- Returns:
- the maximum pages
-
maxPageLimit
public int maxPageLimit()Pagination limit - sets the maximum value for the `limit` request parameter, when it is used.- Returns:
- the maximum page limit
-
accessLogEnabled
public boolean accessLogEnabled()Enable/disable the Para access log.- Returns:
- true if access log is enabled
-
exceptionOnWriteErrorsEnabled
public boolean exceptionOnWriteErrorsEnabled()Enable/disable throwing an exception when a write operation fails with errors.- Returns:
- true if exception on write errors is enabled
-
importBatchSize
public int importBatchSize()The maximum number of objects to import, in each batch, when restoring data from backup.- Returns:
- the import batch size
-
gzipEnabled
public boolean gzipEnabled()Enable/disable the GZIP filter for compressing API response entities.- Returns:
- true if GZIP is enabled
-
debugRequestSignaturesEnabled
public boolean debugRequestSignaturesEnabled()Enable/disable debuging info for each AWS V4 request signature.- Returns:
- true if debuging of request signatures is enabled
-
voteExpiresAfterSec
public int voteExpiresAfterSec()Vote expiration timeout, in seconds. Users can vote again on the same content after this period has elapsed. Default is 30 days.- Returns:
- the vote expiration timeout
-
voteLockedAfterSec
public int voteLockedAfterSec()Vote locking period, in seconds. Vote cannot be changed after this period has elapsed. Default is 30 sec.- Returns:
- the vote locking period
-
pluginFolder
The folder from which Para will load its JAR plugin files.- Returns:
- the plugin folder path
-
appIdSpacePrefixEnabled
public boolean appIdSpacePrefixEnabled()**For internal use only!** Prepends `appid` fields with a space for all shared apps.- Returns:
- true if appid space prefix is enabled
-
versionBannerEnabled
public boolean versionBannerEnabled()Enable/disable version number printing in Para logs.- Returns:
- true if version banner is enabled
-
logoBannerEnabled
public boolean logoBannerEnabled()Enable/disable printing the Para ASCII logo on startup.- Returns:
- true if logo banner is enabled
-
markdownSoftBreak
Sets the Markdown soft break character.- Returns:
- the Markdown soft break character
-
markdownAllowFollowDomains
A whitelist of domains, links to which will be allowed to be followed by web crawlers (comma-separated list).- Returns:
- the allowed domains for crawlers
-
awsSesRegion
AWS region to use in the `AWSEmailer` implementation.- Returns:
- the SES region
-
pidFileEnabled
public boolean pidFileEnabled()Enable/disable PID file generation on startup.- Returns:
- true if PID file generation is enabled
-
separator
-
defaultEncoding
-
landingPageEnabled
public boolean landingPageEnabled()Enable/disable the landing page when opening the server address in the browser.- Returns:
- true if landing page is enabled
-
mcpServerMode
Enable/disable the MCP server. Possible values: `off`, `r` - read-only, `rw` - full access.- Returns:
- the MCP server mode
-
replicaRegions
-
inDevelopment
public boolean inDevelopment()Returns true if the environment is "development".- Returns:
- development environment flag
-
inProduction
public boolean inProduction()Returns true if the environment is "production".- Returns:
- production environment flag
-
getRootAppIdentifier
Returns the name of the root Para app, without any spaces.- Returns:
- the root app identifier
-