}
};
public ConfigurationBasedDeploymentContext() {
super();
AbstractConfiguration config = ConfigurationManager.getConfigInstance();
if (config != null) {
String contextValue = getValueFromConfig(DEPLOYMENT_APPLICATION_ID_PROPERTY);
if (contextValue != null) {
setApplicationId(contextValue);
}
contextValue = getValueFromConfig(DEPLOYMENT_DATACENTER_PROPERTY);
if (contextValue != null) {
setDeploymentDatacenter(contextValue);
}
contextValue = getValueFromConfig(DEPLOYMENT_ENVIRONMENT_PROPERTY);
if (contextValue != null) {
setDeploymentEnvironment(contextValue);
}
contextValue = getValueFromConfig(DEPLOYMENT_REGION_PROPERTY);
if (contextValue != null) {
setDeploymentRegion(contextValue);
}
contextValue = getValueFromConfig(DEPLOYMENT_STACK_PROPERTY);
if (contextValue != null) {
setDeploymentStack(contextValue);
}
contextValue = getValueFromConfig(DEPLOYMENT_SERVER_ID_PROPERTY);
if (contextValue != null) {
setDeploymentStack(contextValue);
}
config.addConfigurationListener(configListener);
}
}