org.apache.cocoon.util
Class SettingsHelper

java.lang.Object
  extended by org.apache.cocoon.util.SettingsHelper

public class SettingsHelper
extends Object

Helper class to create Stettings and for replacing property references with the value of the property

Since:
2.1.9
Version:
$Id: SettingsHelper.html 1304258 2012-03-23 10:09:27Z ilgrosso $

Constructor Summary
SettingsHelper()
           
 
Method Summary
static void createSettings(DefaultContext context, Logger logger)
          Create the settings object
static Settings getSettings(Context context)
          Return the Settings object
static String replace(String value, Settings settings, Logger logger)
          Replace all property references in the string with the current value and return it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SettingsHelper

public SettingsHelper()
Method Detail

createSettings

public static void createSettings(DefaultContext context,
                                  Logger logger)
                           throws ContextException
Create the settings object

Parameters:
context - The current context
logger - A logger to use to log any errors.
Throws:
ContextException

getSettings

public static Settings getSettings(Context context)
Return the Settings object

Parameters:
context - The context
Returns:
The global Settings

replace

public static String replace(String value,
                             Settings settings,
                             Logger logger)
Replace all property references in the string with the current value and return it.



Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.