Save This Page
Home » xwork-2.1.5 » com.opensymphony » xwork2 » util » [javadoc | source]
com.opensymphony.xwork2.util
public interface: ValueStack [javadoc | source]

All Known Implementing Classes:
    OgnlValueStack

ValueStack allows multiple beans to be pushed in and dynamic EL expressions to be evaluated against it. When evaluating an expression, the stack will be searched down the stack, from the latest objects pushed in to the earliest, looking for a bean with a getter or setter for the given property or a method of the given name (depending on the expression being evaluated).
Field Summary
public static final  String VALUE_STACK     
public static final  String REPORT_ERRORS_ON_NO_PROP     
Method from com.opensymphony.xwork2.util.ValueStack Summary:
findString,   findString,   findValue,   findValue,   findValue,   findValue,   getContext,   getExprOverrides,   getRoot,   peek,   pop,   push,   set,   setDefaultType,   setExprOverrides,   setValue,   setValue,   size
Method from com.opensymphony.xwork2.util.ValueStack Detail:
 abstract public String findString(String expr)
 abstract public String findString(String expr,
    boolean throwExceptionOnFailure)
 abstract public Object findValue(String expr)
    Find a value by evaluating the given expression against the stack in the default search order.
 abstract public Object findValue(String expr,
    boolean throwExceptionOnFailure)
 abstract public Object findValue(String expr,
    Class asType)
    Find a value by evaluating the given expression against the stack in the default search order.
 abstract public Object findValue(String expr,
    Class asType,
    boolean throwExceptionOnFailure)
 abstract public Map<String, Object> getContext()
    Gets the context for this value stack. The context holds all the information in the value stack and it's surroundings.
 abstract public Map<Object, Object> getExprOverrides()
    Gets the override map if anyone exists.
 abstract public CompoundRoot getRoot()
    Get the CompoundRoot which holds the objects pushed onto the stack
 abstract public Object peek()
    Get the object on the top of the stack without changing the stack.
 abstract public Object pop()
    Get the object on the top of the stack and remove it from the stack.
 abstract public  void push(Object o)
    Put this object onto the top of the stack
 abstract public  void set(String key,
    Object o)
 abstract public  void setDefaultType(Class defaultType)
    Sets the default type to convert to if no type is provided when getting a value.
 abstract public  void setExprOverrides(Map<Object, Object> overrides)
    Set a override map containing key -> values that takes precedent when doing find operations on the ValueStack.

    See the unit test for ValueStackTest for examples.

 abstract public  void setValue(String expr,
    Object value)
    Attempts to set a property on a bean in the stack with the given expression using the default search order.
 abstract public  void setValue(String expr,
    Object value,
    boolean throwExceptionOnFailure)
    Attempts to set a property on a bean in the stack with the given expression using the default search order.
 abstract public int size()
    Get the number of objects in the stack