org.tigris.scarab.om
Class GlobalParameterManager

java.lang.Object
  extended byorg.apache.torque.manager.AbstractBaseManager
      extended byorg.tigris.scarab.om.BaseGlobalParameterManager
          extended byorg.tigris.scarab.om.GlobalParameterManager
All Implemented Interfaces:
java.io.Serializable

public class GlobalParameterManager
extends BaseGlobalParameterManager

This class manages GlobalParameter objects. Global is used a bit loosely here. Parameters can be module scoped as well. for example, the email parameters have a global set which is the default, if the module does not provide alternatives.

Version:
$Id: GlobalParameterManager.java 9977 2005-12-09 00:40:59Z hair $
Author:
John McNally
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.tigris.scarab.om.BaseGlobalParameterManager
DEFAULT_MANAGER_CLASS, MANAGED_CLASS
 
Fields inherited from class org.apache.torque.manager.AbstractBaseManager
cache, listenersMap, log, mrCache, validFields
 
Constructor Summary
GlobalParameterManager()
          Creates a new GlobalParameterManager instance.
 
Method Summary
static boolean getBoolean(java.lang.String name)
           
static boolean getBoolean(java.lang.String name, Module module)
           
static boolean getBooleanFromHierarchy(java.lang.String key, Module module, boolean def)
          Recursively look up for the existence of the key.
static java.lang.String getString(java.lang.String key)
           
static java.lang.String getString(java.lang.String name, Module module)
           
static java.lang.String getStringFromHierarchy(java.lang.String key, Module module, java.lang.String def)
          Recursively look up for the existence of the key in the module hierarchy.
protected  org.apache.torque.om.Persistent putInstanceImpl(org.apache.torque.om.Persistent om)
           
static void setBoolean(java.lang.String name, boolean value)
           
static void setBoolean(java.lang.String name, Module module, boolean value)
           
static void setString(java.lang.String name, Module module, java.lang.String value)
           
static void setString(java.lang.String name, java.lang.String value)
           
 
Methods inherited from class org.tigris.scarab.om.BaseGlobalParameterManager
addCacheListener, clear, exists, existsImpl, getCachedInstance, getCachedInstanceImpl, getInstance, getInstance, getInstance, getInstance, getInstance, getInstanceImpl, getInstanceImpl, getInstanceImpl, getInstances, getInstances, getInstancesImpl, getInstancesImpl, getManager, getMethodResult, putInstance, retrieveStoredOM, retrieveStoredOMs
 
Methods inherited from class org.apache.torque.manager.AbstractBaseManager
addCacheListenerImpl, cacheGet, clearImpl, getClassName, getMethodResultCache, getOMClass, getOMInstance, getOMInstance, getOMInstance, getOMs, getOMs, getOMs, getRegion, notifyListeners, putInstanceImpl, registerAsListener, removeInstanceImpl, setClassName, setOMClass, setRegion
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GlobalParameterManager

public GlobalParameterManager()
                       throws org.apache.torque.TorqueException
Creates a new GlobalParameterManager instance.

Throws:
org.apache.torque.TorqueException - if an error occurs
Method Detail

putInstanceImpl

protected org.apache.torque.om.Persistent putInstanceImpl(org.apache.torque.om.Persistent om)
                                                   throws org.apache.torque.TorqueException
Throws:
org.apache.torque.TorqueException

getString

public static java.lang.String getString(java.lang.String key)
                                  throws org.apache.torque.TorqueException
Throws:
org.apache.torque.TorqueException

getString

public static java.lang.String getString(java.lang.String name,
                                         Module module)
                                  throws org.apache.torque.TorqueException
Throws:
org.apache.torque.TorqueException

setString

public static void setString(java.lang.String name,
                             java.lang.String value)
                      throws org.apache.torque.TorqueException
Throws:
org.apache.torque.TorqueException

setString

public static void setString(java.lang.String name,
                             Module module,
                             java.lang.String value)
                      throws org.apache.torque.TorqueException
Throws:
org.apache.torque.TorqueException

getBoolean

public static boolean getBoolean(java.lang.String name)
                          throws org.apache.torque.TorqueException
Throws:
org.apache.torque.TorqueException

getBoolean

public static boolean getBoolean(java.lang.String name,
                                 Module module)
                          throws org.apache.torque.TorqueException
Throws:
org.apache.torque.TorqueException

getBooleanFromHierarchy

public static boolean getBooleanFromHierarchy(java.lang.String key,
                                              Module module,
                                              boolean def)
Recursively look up for the existence of the key. Further details, @see #getBooleanFromHierarchy(String key, Module module, boolean def) If no value was not found, return "def" instead.

Parameters:
key -
module -
def -
Returns:

getStringFromHierarchy

public static java.lang.String getStringFromHierarchy(java.lang.String key,
                                                      Module module,
                                                      java.lang.String def)
Recursively look up for the existence of the key in the module hierarchy. Backtrack towards the module root. If no value was found, check for the existence of a module-independent global parameter. If still no value found, check for the Turbine configuration property with the same key. If still no definition found, return the parameter "def" instead.

Parameters:
key -
module -
def -
Returns:

setBoolean

public static void setBoolean(java.lang.String name,
                              boolean value)
                       throws org.apache.torque.TorqueException
Throws:
org.apache.torque.TorqueException

setBoolean

public static void setBoolean(java.lang.String name,
                              Module module,
                              boolean value)
                       throws org.apache.torque.TorqueException
Throws:
org.apache.torque.TorqueException


Copyright © 2000-2004 Tigris.org. All Rights Reserved.