net.sf.jameleon.function
Class ContextHelper

java.lang.Object
  extended by net.sf.jameleon.function.ContextHelper

public final class ContextHelper
extends Object

The ContextHelper class is used as a helper class to remove the context-specific calls from Jameleon Tags.


Method Summary
static boolean getValueAsBooleanWithConfig(JellyContext context, String contextName, String configName, boolean defaultValue)
           
static int getValueAsIntWithConfig(JellyContext context, String contextName, String configName, int defaultValue)
           
static String getValueAsStringWithConfig(JellyContext context, String contextName, String configName, String defaultValue)
           
static Object getVariable(JellyContext context, String name)
           
static boolean getVariableAsBoolean(JellyContext context, String name)
           
static int getVariableAsInt(JellyContext context, String name)
           
static List getVariableAsList(JellyContext context, String key)
           
static String getVariableAsString(JellyContext context, String name)
           
static boolean isVariableNull(JellyContext context, String name)
           
static List makeList(Object obj)
           
static void removeVariable(JellyContext context, String name)
           
static void removeVariables(JellyContext context, List vars)
           
static void setVariable(JellyContext context, String name, Object value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setVariable

public static void setVariable(JellyContext context,
                               String name,
                               Object value)

getVariable

public static Object getVariable(JellyContext context,
                                 String name)

removeVariable

public static void removeVariable(JellyContext context,
                                  String name)

getVariableAsString

public static String getVariableAsString(JellyContext context,
                                         String name)

getValueAsBooleanWithConfig

public static boolean getValueAsBooleanWithConfig(JellyContext context,
                                                  String contextName,
                                                  String configName,
                                                  boolean defaultValue)

getValueAsIntWithConfig

public static int getValueAsIntWithConfig(JellyContext context,
                                          String contextName,
                                          String configName,
                                          int defaultValue)

getValueAsStringWithConfig

public static String getValueAsStringWithConfig(JellyContext context,
                                                String contextName,
                                                String configName,
                                                String defaultValue)

getVariableAsBoolean

public static boolean getVariableAsBoolean(JellyContext context,
                                           String name)

getVariableAsInt

public static int getVariableAsInt(JellyContext context,
                                   String name)

getVariableAsList

public static List getVariableAsList(JellyContext context,
                                     String key)

isVariableNull

public static boolean isVariableNull(JellyContext context,
                                     String name)

makeList

public static List makeList(Object obj)

removeVariables

public static void removeVariables(JellyContext context,
                                   List vars)


Copyright © 2003-2008 Christian Hargraves. All Rights Reserved.