Save This Page
Home » xwork-2.1.1-src » com.opensymphony.xwork2.ognl » [javadoc | source]
com.opensymphony.xwork2.ognl
public class: OgnlUtil [javadoc | source]
java.lang.Object
   com.opensymphony.xwork2.ognl.OgnlUtil
Utility class that provides common access to the Ognl APIs for setting and getting properties from objects (usually Actions).
Method from com.opensymphony.xwork2.ognl.OgnlUtil Summary:
compile,   copy,   copy,   getBeanInfo,   getBeanInfo,   getBeanMap,   getPropertyDescriptors,   getPropertyDescriptors,   getRealTarget,   getTypeConverterFromContext,   getValue,   getValue,   internalSetProperty,   setProperties,   setProperties,   setProperties,   setProperties,   setProperty,   setProperty,   setValue,   setXWorkConverter
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.opensymphony.xwork2.ognl.OgnlUtil Detail:
 public Object compile(String expression) throws OgnlException 
 public  void copy(Object from,
    Object to,
    Map context) 
 public  void copy(Object from,
    Object to,
    Map context,
    Collection exclusions,
    Collection inclusions) 
 public BeanInfo getBeanInfo(Object from) throws IntrospectionException 
    Get's the java bean info for the given source object. Calls getBeanInfo(Class c).
 public BeanInfo getBeanInfo(Class clazz) throws IntrospectionException 
    Get's the java bean info for the given source.
 public Map getBeanMap(Object source) throws IntrospectionException, OgnlException 
    Creates a Map with read properties for the given source object.

    If the source object does not have a read property (i.e. write-only) then the property is added to the map with the value here is no read method for property-name.

 public PropertyDescriptor[] getPropertyDescriptors(Object source) throws IntrospectionException 
    Get's the java beans property descriptors for the given source.
 public PropertyDescriptor[] getPropertyDescriptors(Class clazz) throws IntrospectionException 
    Get's the java beans property descriptors for the given class.
 public Object getRealTarget(String property,
    Map context,
    Object root) throws OgnlException 
    Looks for the real target with the specified property given a root Object which may be a CompoundRoot.
 TypeConverter getTypeConverterFromContext(Map context) 
 public Object getValue(String name,
    Map context,
    Object root) throws OgnlException 
 public Object getValue(String name,
    Map context,
    Object root,
    Class resultType) throws OgnlException 
  void internalSetProperty(String name,
    Object value,
    Object o,
    Map context,
    boolean throwPropertyExceptions) 
 public  void setProperties(Map properties,
    Object o) 
    Sets the properties on the object using the default context, defaulting to not throwing exceptions for problems setting the properties.
 public  void setProperties(Map props,
    Object o,
    Map context) 
    Sets the object's properties using the default type converter, defaulting to not throw exceptions for problems setting the properties.
 public  void setProperties(Map properties,
    Object o,
    boolean throwPropertyExceptions) 
    Sets the properties on the object using the default context.
 public  void setProperties(Map props,
    Object o,
    Map context,
    boolean throwPropertyExceptions) 
    Sets the object's properties using the default type converter.
 public  void setProperty(String name,
    Object value,
    Object o,
    Map context) 
    Sets the named property to the supplied value on the Object, defaults to not throwing property exceptions.
 public  void setProperty(String name,
    Object value,
    Object o,
    Map context,
    boolean throwPropertyExceptions) 
    Sets the named property to the supplied value on the Object.
 public  void setValue(String name,
    Map context,
    Object root,
    Object value) throws OgnlException 
    Wrapper around Ognl.setValue() to handle type conversion for collection elements. Ideally, this should be handled by OGNL directly.
 public  void setXWorkConverter(XWorkConverter conv)