public class Profile extends Object
A Profile
is typically used to activate a set of configurations which
may vary depending on the target environment (e.g. dev, qa, prod).
A Profile
is activated using the "dandelion.profile.active"
system property and will tell Dandelion to load the configuration file using
the following syntax: dandelion_[activeProfile].properties
.
Note that only one profile can be activated at a time.
StandardConfigurationLoader
Modifier and Type | Field and Description |
---|---|
static String |
DANDELION_PROFILE_ACTIVE |
static String |
DEFAULT_DEV_PROFILE |
static String |
DEFAULT_PROD_PROFILE |
static String[] |
DEV_ALIASES |
static String[] |
PROD_ALIASES |
Constructor and Description |
---|
Profile() |
Modifier and Type | Method and Description |
---|---|
static String |
getActiveProfile()
Retrieves the current active profile.
|
static String |
getActiveRawProfile()
Retrieves the current and untouched active profile.
|
public static final String DANDELION_PROFILE_ACTIVE
public static final String DEFAULT_DEV_PROFILE
public static final String DEFAULT_PROD_PROFILE
public static final String[] DEV_ALIASES
public static final String[] PROD_ALIASES
public static String getActiveProfile()
Retrieves the current active profile.
Some words are reserved and allow Dandelion to use a preconfigured set of configurations:
DandelionConfig
entry.DandelionConfig
entry.public static String getActiveRawProfile()
Retrieves the current and untouched active profile.
Copyright © 2013-2015 Dandelion Project. All Rights Reserved.