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()
      No-args constructor.
  • Method Details

    • getConfigRootPrefix

      public String getConfigRootPrefix()
      The configuration root prefix.
      Specified by:
      getConfigRootPrefix in class Config
      Returns:
      PARA
    • appName

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

      public String rootSecretOverride()
      Overrides the secret key for the root Para app `app:para` once, upon first initialization.
      Returns:
      the secret key override
    • serverContextPath

      public String 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

      public String environment()
      Enables/disables certain features, depending on the environment. Can be one of `production`, `development” or `embedded`.
      Returns:
      the environment name
    • daoPlugin

      public String 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

      public String searchPlugin()
      Selects the `Search` implementation at runtime. Can be `LuceneSearch`, `ElasticSearch`, etc.
      Returns:
      the search plugin name
    • cachePlugin

      public String cachePlugin()
      Selects the `Cache` implementation at runtime. Can be one of `CaffeineSearch`, `HazelcastCache`.
      Returns:
      the cache plugin name
    • queuePlugin

      public String queuePlugin()
      Selects the `Queue` implementation at runtime. Can be one of `LocalQueue`, `AWSQueue`.
      Returns:
      the queue plugin name
    • fileStoragePlugin

      public String fileStoragePlugin()
      Selects the `FileStore` implementation at runtime. Can be one of `LocalFileStore`, `AWSFileStore`.
      Returns:
      the file storage plugin name
    • emailerPlugin

      public String 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

      public String clusterName()
      The name of the Para cluster. Used by some of the plugins to isolate deployments.
      Returns:
      the cluster name
    • corePackageName

      @Deprecated public String 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

      public String adminIdentifier()
      The identifier of the first administrator (can be email or social login ID).
      Returns:
      the admin identifier
    • workerId

      public String 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

      public String facebookAppId()
      Facebook OAuth2 app ID.
      Returns:
      the FB app id
    • facebookSecret

      public String facebookSecret()
      Facebook app secret key.
      Returns:
      the FB secret
    • googleAppId

      public String googleAppId()
      Google OAuth2 app ID.
      Returns:
      the Google app id
    • googleSecret

      public String googleSecret()
      Google app secret key.
      Returns:
      the Google secret
    • linkedinAppId

      public String linkedinAppId()
      LinkedIn OAuth2 app ID.
      Returns:
      the LinkedIn app id
    • linkedinSecret

      public String linkedinSecret()
      LinkedIn app secret key.
      Returns:
      the LinkedIn secret
    • twitterAppId

      public String twitterAppId()
      Twitter OAuth app ID.
      Returns:
      the Twitter app id
    • twitterSecret

      public String twitterSecret()
      Twitter app secret key.
      Returns:
      the Twitter secret
    • githubAppId

      public String githubAppId()
      GitHub OAuth2 app ID.
      Returns:
      the GitHub app id
    • githubSecret

      public String githubSecret()
      GitHub app secret key.
      Returns:
      the GitHub secret
    • microsoftAppId

      public String microsoftAppId()
      Microsoft OAuth2 app ID.
      Returns:
      the Microsoft app id
    • microsoftSecret

      public String microsoftSecret()
      Microsoft app secret key.
      Returns:
      the Microsoft secret
    • microsoftTenantId

      public String microsoftTenantId()
      Microsoft OAuth2 tenant ID.
      Returns:
      the Microsoft tenant id
    • amazonAppId

      public String amazonAppId()
      Amazon OAuth2 app ID.
      Returns:
      the Amazon app id
    • amazonSecret

      public String amazonSecret()
      Amazon app secret key.
      Returns:
      the Amazon secret
    • slackAppId

      public String slackAppId()
      Slack OAuth2 app ID.
      Returns:
      the Slack app id
    • slackSecret

      public String slackSecret()
      Slack app secret key.
      Returns:
      the Slack secret
    • mattermostAppId

      public String mattermostAppId()
      Mattermost OAuth2 app ID.
      Returns:
      the Mattermost app id
    • mattermostSecret

      public String mattermostSecret()
      Mattermost app secret key.
      Returns:
      the Mattermost secret
    • 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()
      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

      public String authCookieName()
      The name of the authorization cookie.
      Returns:
      the auth cookie name
    • 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

      public String 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

      public String 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

      public String signinPath()
      The path to the login page.
      Returns:
      the sign-in path
    • signinSuccessPath

      public String signinSuccessPath()
      The default page to send users to when they login.
      Returns:
      the sign-in success path
    • signinFailurePath

      public String signinFailurePath()
      The default page to send users to when login fails.
      Returns:
      the sign-in failure path
    • signoutPath

      public String signoutPath()
      The path to the logout page.
      Returns:
      the sign-out path
    • signoutSuccessPath

      public String signoutSuccessPath()
      The default page to send users to when they logout.
      Returns:
      the sign-out success path
    • accessDeniedPath

      public String accessDeniedPath()
      The path to redirect to when 403 code is returned.
      Returns:
      the access denied path
    • returnToPath

      public String returnToPath()
      The path to return to when an authentication request succeeds.
      Returns:
      the return-to path
    • rememberMeEnabled

      @Deprecated public boolean rememberMeEnabled()
      Deprecated.
      Enable/disable remember me functionality.
      Returns:
      true if remember me is enabled
    • appSecretKey

      @Deprecated public String appSecretKey()
      Deprecated.
      Salt.
      Returns:
      the app secret key
    • defaultQueueName

      public String 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

      public String 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

      public String metricsGraphitePrefixSystem()
      The prefix to apply to system metric names.
      Returns:
      the Graphite system prefix
    • metricsGraphitePrefixApps

      public String 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

      public String ldapPasswordParameter()
      LDAP password parameter name.
      Returns:
      the LDAP password parameter
    • ldapUsernameParameter

      public String ldapUsernameParameter()
      LDAP username parameter name.
      Returns:
      the LDAP username parameter
    • 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)
      The S3 bucket where files will be stored by `FileStore` implementations.
      Parameters:
      region - the AWS region
      Returns:
      the S3 bucket name
    • awsS3MaxFileSizeMb

      public int awsS3MaxFileSizeMb()
      Maximum file size for files uploaded to S3, in megabytes.
      Returns:
      the max file size in MB
    • localFileStoreFolder

      public String 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

      public String clientSslProtocols()
      SSL protocols allowed for a successul connection.
      Returns:
      the allowed SSL protocols
    • clientSslKeystore

      public String clientSslKeystore()
      The SSL key store location. This contains the certificates used by the Para client.
      Returns:
      the SSL key store location
    • clientSslKeystorePassword

      public String clientSslKeystorePassword()
      The SSL key store password.
      Returns:
      the SSL key store password
    • clientSslTruststore

      public String clientSslTruststore()
      The SSL trust store location. This contains the certificates and CAs which the client trusts.
      Returns:
      the SSL trust store location
    • clientSslTruststorePassword

      public String 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

      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()
      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

      public String elasticsearchRestClientScheme()
      The scheme to use when connecting to the Elasticsearch server - `http` or `https`.
      Returns:
      the REST client scheme
    • elasticsearchRestClientHost

      public String elasticsearchRestClientHost()
      The ES server hostname.
      Returns:
      the REST client host
    • 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

      public String elasticsearchRestClientContextPath()
      The context path where ES is deployed, if any.
      Returns:
      the REST client context path
    • elasticsearchAutoExpandReplicas

      public String 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

      public String elasticsearchTrackTotalHits()
      Makes ES track the actual number of hits, even if they are more than the 10000.
      Returns:
      true if tracking total hits
    • elasticsearchAwsRegion

      public String elasticsearchAwsRegion()
      The AWS region where ES is deployed. Used for calculating request signatures.
      Returns:
      the AWS region for ES
    • elasticsearchAuthUser

      public String elasticsearchAuthUser()
      The username to use for authentication with ES.
      Returns:
      the ES auth user
    • elasticsearchAuthPassword

      public String 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

      public String 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

      public String luceneDataFolder()
      The data folder where Lucene stores its indexes.
      Returns:
      the Lucene data folder
    • mongoConnectionUri

      public String mongoConnectionUri()
      The MongoDB URI string - verrides host, port, user and password if set.
      Returns:
      the MongoDB connection URI
    • mongoDatabase

      public String mongoDatabase()
      The database name that Para will use. The database should exist before starting Para.
      Returns:
      the MongoDB database name
    • mongoHost

      public String mongoHost()
      The hostname of the MongoDB server.
      Returns:
      the MongoDB host
    • mongoPort

      public int mongoPort()
      The MongoDB server port.
      Returns:
      the MongoDB port
    • mongoAuthUser

      public String mongoAuthUser()
      The username with access to the MongoDB database.
      Returns:
      the MongoDB auth user
    • mongoAuthPassword

      public String mongoAuthPassword()
      The MongoDB user's password.
      Returns:
      the MongoDB auth password
    • 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

      public String 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

      public String h2DataFolder()
      The data directory for storing H2 databases.
      Returns:
      the H2 data folder
    • h2User

      public String h2User()
      The username with access to the H2 database.
      Returns:
      the H2 user
    • h2Password

      public String h2Password()
      The password of the H2 user.
      Returns:
      the H2 password
    • h2ServerParameters

      public String h2ServerParameters()
      Parameters for the H2 TCP server.
      Returns:
      the H2 server parameters
    • sqlHostUrl

      public String sqlHostUrl()
      The server URL to connect to, *without* the `jdbc:` prefix.
      Returns:
      the SQL host URL
    • sqlDriver

      public String sqlDriver()
      The fully-qualified class name for your SQL driver.
      Returns:
      the SQL driver class name
    • sqlUser

      public String sqlUser()
      The username with access to the database.
      Returns:
      the SQL user
    • sqlPassword

      public String sqlPassword()
      The database user's password.
      Returns:
      the SQL password
    • cassandraHosts

      public String cassandraHosts()
      Comma-separated Cassandra server hosts (contact points).
      Returns:
      the Cassandra hosts
    • cassandraKeyspace

      public String cassandraKeyspace()
      The name of the Cassandra keyspace to use.
      Returns:
      the Cassandra keyspace
    • cassandraUser

      public String cassandraUser()
      The Cassandra username with access to the database.
      Returns:
      the Cassandra user
    • cassandraPassword

      public String 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

      public String cassandraSslProtocols()
      The protocols allowed for successful connection to Cassandra cluster.
      Returns:
      the Cassandra SSL protocols
    • cassandraSslKeystore

      public String cassandraSslKeystore()
      Cassandra client key store, containing the certificates to use.
      Returns:
      the Cassandra SSL key store
    • cassandraSslKeystorePassword

      public String cassandraSslKeystorePassword()
      Password for the Cassandra client key store.
      Returns:
      the Cassandra SSL key store password
    • cassandraTruststore

      public String cassandraTruststore()
      Cassandra client trust store, containing trusted certificates and CAs.
      Returns:
      the Cassandra trust store
    • cassandraTruststorePassword

      public String 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

      public String 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

      public String hazelcastAwsAccessKey()
      The AWS access key to use if EC2 auto-discovery is enabled in Hazelcast.
      Returns:
      the AWS access key
    • hazelcastAwsSecretKey

      public String hazelcastAwsSecretKey()
      The AWS secret key to use if EC2 auto-discovery is enabled in Hazelcast.
      Returns:
      the AWS secret key
    • hazelcastAwsRegion

      public String hazelcastAwsRegion()
      The AWS region to use if EC2 auto-discovery is enabled in Hazelcast.
      Returns:
      the AWS region
    • hazelcastEc2DiscoveryGroup

      public String 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

      public String 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
    • sharedTableName

      public String sharedTableName()
      The name of the shared database table, used by shared apps.
      Returns:
      the shared table name
    • 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

      public String 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

      public String markdownSoftBreak()
      Sets the Markdown soft break character.
      Returns:
      the Markdown soft break character
    • markdownAllowFollowDomains

      public String[] 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

      public String 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

      public String separator()
      String separator - default is colon `:`.
      Returns:
      the string separator
    • defaultEncoding

      public String defaultEncoding()
      Default character encoding - `UTF-8`.
      Returns:
      the default encoding
    • 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

      public String mcpServerMode()
      Enable/disable the MCP server. Possible values: `off`, `r` - read-only, `rw` - full access.
      Returns:
      the MCP server mode
    • replicaRegions

      public List<String> replicaRegions()
      Returns the list of regions where a table should be replicated (global table). Currently, this is only used in combination with DynamoDB and SQS but could be implemented with other services.
      Returns:
      a list of regions
    • 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

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