com.opensymphony.xwork.util
Class CompoundRootAccessor

java.lang.Object
  extended by com.opensymphony.xwork.util.CompoundRootAccessor
All Implemented Interfaces:
ognl.ClassResolver, ognl.MethodAccessor, ognl.PropertyAccessor

public class CompoundRootAccessor
extends Object
implements ognl.PropertyAccessor, ognl.MethodAccessor, ognl.ClassResolver

An OGNL property accessor that is able to call methods on objects in the CompoundRoot.

Version:
$Date: 2007-11-25 09:20:49 -0600 (Sun, 25 Nov 2007) $ $Id: CompoundRootAccessor.java 1684 2007-11-25 15:20:49Z tm_jee $
Author:
Rainer Hermanns, tmjee

Constructor Summary
CompoundRootAccessor()
           
 
Method Summary
 Object callMethod(Map context, Object target, String name, Object[] objects)
           
 Object callStaticMethod(Map transientVars, Class aClass, String s, Object[] objects)
           
 Class classForName(String className, Map context)
           
 Object getProperty(Map context, Object target, Object name)
           
 Class getPropertyClass(ognl.OgnlContext ognlcontext, Object target, Object name)
           
 String getSourceAccessor(ognl.OgnlContext ognlcontext, Object target, Object name)
           
 String getSourceSetter(ognl.OgnlContext ognlcontext, Object target, Object name)
           
 void setProperty(Map context, Object target, Object name, Object value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompoundRootAccessor

public CompoundRootAccessor()
Method Detail

getPropertyClass

public Class getPropertyClass(ognl.OgnlContext ognlcontext,
                              Object target,
                              Object name)

getSourceAccessor

public String getSourceAccessor(ognl.OgnlContext ognlcontext,
                                Object target,
                                Object name)

getSourceSetter

public String getSourceSetter(ognl.OgnlContext ognlcontext,
                              Object target,
                              Object name)

setProperty

public void setProperty(Map context,
                        Object target,
                        Object name,
                        Object value)
                 throws ognl.OgnlException
Specified by:
setProperty in interface ognl.PropertyAccessor
Parameters:
context -
target -
name -
value -
Throws:
ognl.OgnlException

getProperty

public Object getProperty(Map context,
                          Object target,
                          Object name)
                   throws ognl.OgnlException
Specified by:
getProperty in interface ognl.PropertyAccessor
Parameters:
context -
target -
name -
Returns:
Throws:
ognl.OgnlException

callMethod

public Object callMethod(Map context,
                         Object target,
                         String name,
                         Object[] objects)
                  throws ognl.MethodFailedException
Specified by:
callMethod in interface ognl.MethodAccessor
Throws:
ognl.MethodFailedException

callStaticMethod

public Object callStaticMethod(Map transientVars,
                               Class aClass,
                               String s,
                               Object[] objects)
                        throws ognl.MethodFailedException
Specified by:
callStaticMethod in interface ognl.MethodAccessor
Throws:
ognl.MethodFailedException

classForName

public Class classForName(String className,
                          Map context)
                   throws ClassNotFoundException
Specified by:
classForName in interface ognl.ClassResolver
Throws:
ClassNotFoundException

WebWork Project Page