Brightspot CMS Developer Guide

Configuration identifiers, key prefixes, and defaults

Configuration keys are literals, such as toolUrlPrefix and baseUrl. All configuration keys are isolated into prefixes that group the keys into similar functions. (In this way, the prefixes serve as namespaces.) The prefixes have the form of a directory path.

Dari Config IDs prefixes and defaults.svg Dari Config IDs prefixes and defaults.svg

Referring to the previous illustration, the prefix is brightspot/, and the configuration key is toolUrlPrefix.

Some Brightspot features support multiple configurations, such as outgoing mail servers, file servers, and image editors. You place each configuration in its own prefix.

<Environment name="dari/mailProvider/normalServer/host" value="" /> 
<Environment name="dari/mailProvider/secureServer/host" value="" />
  • Configures a hostname for a standard mail server. The configuration ID is normalServer, and the entire prefix is dari/mailProvider/normalServer/.
  • Configures a hostname for a secured mail server. The configuration ID is secureServer, and the entire prefix is dari/mailProvider/secureServer/.

Referring to the previous snippet, there are two configuration keys host, each with its own prefix.

For those features that support multiple configurations, you can assign one configuration as the default.

<Environment name="dari/defaultMailProvider" value="normalServer" /> 
<Environment name="dari/mailProvider/normalServer/host" value="" /> 
<Environment name="dari/mailProvider/secureServer/host" value="" />
  • Sets the default mail server configuration to the values with the prefix dari/mailProvider/normalServer/ .

Providing a default configuration is useful because you can retrieve them with string constants in code.

public class MailProvider {

    public static final String DEFAULT_MAIL_SETTING = "dari/defaultMailProvider";

    public static final String SETTING_PREFIX = "dari/mailProvider";


Referring to the previous snippet, you can retrieve a setting using a combination of DEFAULT_MAIL_SETTING and SETTING_PREFIX. This strategy implies you can change the default configuration in Tomcat without making any changes in code and recompiling.

Previous Topic
Configuring Dari
Next Topic
Database configuration
Was this topic helpful?
Thanks for your feedback.
Our robust, flexible Design System provides hundreds of pre-built components you can use to build the presentation layer of your dreams.

Asset types
Module types
Page types
Brightspot is packaged with content types that get you up and running in a matter of days, including assets, modules and landing pages.

Content types
Landing pages
Everything you need to know when creating, managing, and administering content within Brightspot CMS.

Admin configurations
A guide for installing, supporting, extending, modifying and administering code on the Brightspot platform.

Field types
Content modeling
Rich-text elements
A guide to configuring Brightspot's library of integrations, including pre-built options and developer-configured extensions.

Google Analytics
Apple News