org.broadleafcommerce.common.config
Class SystemPropertyRuntimeEnvironmentKeyResolver

java.lang.Object
  extended by org.broadleafcommerce.common.config.SystemPropertyRuntimeEnvironmentKeyResolver
All Implemented Interfaces:
RuntimeEnvironmentKeyResolver

public class SystemPropertyRuntimeEnvironmentKeyResolver
extends Object
implements RuntimeEnvironmentKeyResolver

Determines the current runtime environment by reading a system property (specified in environmentKey); if no system property is specified, a (reasonable) default of "runtime.environment" is used.


Field Summary
protected  String environmentKey
           
 
Constructor Summary
SystemPropertyRuntimeEnvironmentKeyResolver()
           
 
Method Summary
 String resolveRuntimeEnvironmentKey()
          Determine and return the runtime environment; if an implementation is unable to determine the runtime environment, null can be returned to indicate this.
 void setEnvironmentKey(String environmentKey)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

environmentKey

protected String environmentKey
Constructor Detail

SystemPropertyRuntimeEnvironmentKeyResolver

public SystemPropertyRuntimeEnvironmentKeyResolver()
Method Detail

resolveRuntimeEnvironmentKey

public String resolveRuntimeEnvironmentKey()
Description copied from interface: RuntimeEnvironmentKeyResolver
Determine and return the runtime environment; if an implementation is unable to determine the runtime environment, null can be returned to indicate this.

Specified by:
resolveRuntimeEnvironmentKey in interface RuntimeEnvironmentKeyResolver

setEnvironmentKey

public void setEnvironmentKey(String environmentKey)


Copyright © 2013. All Rights Reserved.