com.opensymphony.xwork2.util.reflection
Class ReflectionContextState

java.lang.Object
  extended by com.opensymphony.xwork2.util.reflection.ReflectionContextState

public class ReflectionContextState
extends Object

Manages variables in the reflection context and returns values to be used by the application.

Author:
Gabe

Field Summary
static String CREATE_NULL_OBJECTS
           
static String CURRENT_PROPERTY_PATH
           
static String DENY_INDEXED_ACCESS_EXECUTION
           
static String DENY_METHOD_EXECUTION
           
static String FULL_PROPERTY_PATH
           
private static String GETTING_BY_KEY_PROPERTY
           
private static String SET_MAP_KEY
           
 
Constructor Summary
ReflectionContextState()
           
 
Method Summary
static void clear(Map context)
           
static void clearCurrentPropertyPath(Map context)
           
private static boolean getBooleanProperty(String property, Map context)
           
static String getCurrentPropertyPath(Map context)
          Gets the current property path but not completely.
static String getFullPropertyPath(Map context)
           
static Class getLastBeanClassAccessed(Map context)
           
static String getLastBeanPropertyAccessed(Map context)
           
static Map getSetMap(Map context, String path)
           
static boolean isCreatingNullObjects(Map context)
           
static boolean isDenyMethodExecution(Map context)
           
static boolean isGettingByKeyProperty(Map context)
           
static boolean isReportingConversionErrors(Map context)
           
private static void setBooleanValue(String property, Map context, boolean value)
           
static void setCreatingNullObjects(Map context, boolean creatingNullObjects)
           
static void setDenyMethodExecution(Map context, boolean denyMethodExecution)
           
static void setFullPropertyPath(Map context, String path)
           
static void setGettingByKeyProperty(Map context, boolean gettingByKeyProperty)
           
static void setLastBeanClassAccessed(Map context, Class clazz)
           
static void setLastBeanPropertyAccessed(Map context, String property)
           
static void setReportingConversionErrors(Map context, boolean reportingErrors)
           
static void setSetMap(Map context, Map setMap, String path)
           
static void updateCurrentPropertyPath(Map context, Object name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CURRENT_PROPERTY_PATH

public static final String CURRENT_PROPERTY_PATH
See Also:
Constant Field Values

FULL_PROPERTY_PATH

public static final String FULL_PROPERTY_PATH
See Also:
Constant Field Values

GETTING_BY_KEY_PROPERTY

private static final String GETTING_BY_KEY_PROPERTY
See Also:
Constant Field Values

SET_MAP_KEY

private static final String SET_MAP_KEY
See Also:
Constant Field Values

CREATE_NULL_OBJECTS

public static final String CREATE_NULL_OBJECTS
See Also:
Constant Field Values

DENY_METHOD_EXECUTION

public static final String DENY_METHOD_EXECUTION
See Also:
Constant Field Values

DENY_INDEXED_ACCESS_EXECUTION

public static final String DENY_INDEXED_ACCESS_EXECUTION
See Also:
Constant Field Values
Constructor Detail

ReflectionContextState

public ReflectionContextState()
Method Detail

isCreatingNullObjects

public static boolean isCreatingNullObjects(Map context)

setCreatingNullObjects

public static void setCreatingNullObjects(Map context,
                                          boolean creatingNullObjects)

isGettingByKeyProperty

public static boolean isGettingByKeyProperty(Map context)

setDenyMethodExecution

public static void setDenyMethodExecution(Map context,
                                          boolean denyMethodExecution)

isDenyMethodExecution

public static boolean isDenyMethodExecution(Map context)

setGettingByKeyProperty

public static void setGettingByKeyProperty(Map context,
                                           boolean gettingByKeyProperty)

isReportingConversionErrors

public static boolean isReportingConversionErrors(Map context)

setReportingConversionErrors

public static void setReportingConversionErrors(Map context,
                                                boolean reportingErrors)

getLastBeanClassAccessed

public static Class getLastBeanClassAccessed(Map context)

setLastBeanPropertyAccessed

public static void setLastBeanPropertyAccessed(Map context,
                                               String property)

getLastBeanPropertyAccessed

public static String getLastBeanPropertyAccessed(Map context)

setLastBeanClassAccessed

public static void setLastBeanClassAccessed(Map context,
                                            Class clazz)

getCurrentPropertyPath

public static String getCurrentPropertyPath(Map context)
Gets the current property path but not completely. It does not use the [ and ] used in some representations of Maps and Lists. The reason for this is that the current property path is only currently used for caching purposes so there is no real reason to have an exact replica.

So if the real path is myProp.myMap['myKey'] this would return myProp.myMap.myKey.

Parameters:
context -

getFullPropertyPath

public static String getFullPropertyPath(Map context)

setFullPropertyPath

public static void setFullPropertyPath(Map context,
                                       String path)

updateCurrentPropertyPath

public static void updateCurrentPropertyPath(Map context,
                                             Object name)

setSetMap

public static void setSetMap(Map context,
                             Map setMap,
                             String path)

getSetMap

public static Map getSetMap(Map context,
                            String path)

getBooleanProperty

private static boolean getBooleanProperty(String property,
                                          Map context)

setBooleanValue

private static void setBooleanValue(String property,
                                    Map context,
                                    boolean value)

clearCurrentPropertyPath

public static void clearCurrentPropertyPath(Map context)

clear

public static void clear(Map context)


Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.