org.kuali.ole.utility
Class ConfigUtil

java.lang.Object
  extended by org.kuali.ole.utility.ConfigUtil

public class ConfigUtil
extends Object

Logic for determining a base directory for Kuali applications by examining system properties and the environment the application is running in


Field Summary
static String KUALI_HOME_DEFAULT_VALUE
           
static String KUALI_HOME_ENVIRONMENT_VAR
           
static String KUALI_HOME_SYSTEM_PROPERTY
           
 
Constructor Summary
ConfigUtil()
           
 
Method Summary
 String getApplicationHome(String group, String application)
           
 String getGroupHome(String group)
           
 String getKualiHome()
          Return the configured value for the kuali.home system property, the KUALI_HOME environment variable, or a default value for "kuali.home" based on "user.home".
 String getValue(String systemProperty, String environmentVariable, String defaultValue)
          Locate a value by examining system properties and environment variables.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

KUALI_HOME_SYSTEM_PROPERTY

public static final String KUALI_HOME_SYSTEM_PROPERTY
See Also:
Constant Field Values

KUALI_HOME_ENVIRONMENT_VAR

public static final String KUALI_HOME_ENVIRONMENT_VAR
See Also:
Constant Field Values

KUALI_HOME_DEFAULT_VALUE

public static final String KUALI_HOME_DEFAULT_VALUE
Constructor Detail

ConfigUtil

public ConfigUtil()
Method Detail

getKualiHome

public String getKualiHome()
Return the configured value for the kuali.home system property, the KUALI_HOME environment variable, or a default value for "kuali.home" based on "user.home". When this method finishes the system property kuali.home is guaranteed to be set to the same value returned by this method.


getGroupHome

public String getGroupHome(String group)

getApplicationHome

public String getApplicationHome(String group,
                                 String application)

getValue

public String getValue(String systemProperty,
                       String environmentVariable,
                       String defaultValue)
Locate a value by examining system properties and environment variables. If a system property is found, the system property always wins. Otherwise the logic defers to the environment variable before falling through to the default value.

Parameters:
systemProperty -
environmentVariable -
defaultValue -
Returns:


Copyright © 2004-2012 The Kuali Foundation. All Rights Reserved.