com.basecmp.core.util
Class BCConfiguration

java.lang.Object
  extended bycom.basecmp.core.util.BCConfiguration

public class BCConfiguration
extends java.lang.Object

Purely static service-Class, providing any configuration-values from xml-config. The loaderclass for the xml-config supports the usage of embedded variablesnames in config-parameters in the jtlp-way, meaning you may use a values with a references to another variable, e.g var1=def, var2 = abc${var1}, resulting in a value for var2=abcdef.

Additionally the method getMap() returns a Map-Instance containing all config-keys with their corresponding config-values. This method may be handy to support the use of JSTL in JSPs.

fully refactored on 24.07.2006 by Wolfgang Schröder.

Author:
Wolfgang Schröder

Field Summary
static boolean IS_LIVE_SERVER
           
static java.lang.String PAGE_DELIVERY_USECASE
           
static java.lang.String WEBAPP_NAME
           
 
Method Summary
static java.util.Map getMap()
          Delivers the internally used map-instance with all config-values.
static java.lang.String getProperty(java.lang.String key)
          Returns for any given key the configured value, which was defined in any of the configured config-files.
static void load()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IS_LIVE_SERVER

public static final boolean IS_LIVE_SERVER

PAGE_DELIVERY_USECASE

public static final java.lang.String PAGE_DELIVERY_USECASE

WEBAPP_NAME

public static final java.lang.String WEBAPP_NAME
Method Detail

getMap

public static java.util.Map getMap()
Delivers the internally used map-instance with all config-values. This map comes in handy, when used as an attribute in application- or session-scope of a webapp/http-request for any jsp using JSTL 1.0

Returns:

getProperty

public static java.lang.String getProperty(java.lang.String key)
Returns for any given key the configured value, which was defined in any of the configured config-files.

Notes:

Parameters:
key - String-Name of the configured key
Returns:
The configured string-value of the given key
Throws:
java.lang.IllegalArgumentException - If the given key is null or empty.

load

public static void load()


Copyright © 2004 by basecmp® - Professional Web Solutions