com.opensymphony.xwork2.ognl.accessor
Class XWorkCollectionPropertyAccessor

java.lang.Object
  extended by ognl.ObjectPropertyAccessor
      extended by ognl.SetPropertyAccessor
          extended by com.opensymphony.xwork2.ognl.accessor.XWorkCollectionPropertyAccessor
All Implemented Interfaces:
ognl.PropertyAccessor

public class XWorkCollectionPropertyAccessor
extends ognl.SetPropertyAccessor

Author:
Gabe

Field Summary
static java.lang.String KEY_PROPERTY_FOR_CREATION
           
 
Constructor Summary
XWorkCollectionPropertyAccessor()
           
 
Method Summary
 java.lang.Object getProperty(java.util.Map context, java.lang.Object target, java.lang.Object key)
          Gets the property of a Collection by indexing the collection based on a key property.
 java.lang.Object getPropertyThroughIteration(java.util.Map context, java.util.Collection collection, java.lang.String property, java.lang.Object key)
           
 void setObjectFactory(ObjectFactory fac)
           
 void setObjectTypeDeterminer(ObjectTypeDeterminer ot)
           
 void setProperty(java.util.Map arg0, java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3)
           
 void setXWorkConverter(XWorkConverter conv)
           
 
Methods inherited from class ognl.ObjectPropertyAccessor
getPossibleProperty, getPropertyClass, getSourceAccessor, getSourceSetter, hasGetProperty, hasGetProperty, hasSetProperty, hasSetProperty, setPossibleProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ognl.PropertyAccessor
getSourceAccessor, getSourceSetter
 

Field Detail

KEY_PROPERTY_FOR_CREATION

public static final java.lang.String KEY_PROPERTY_FOR_CREATION
See Also:
Constant Field Values
Constructor Detail

XWorkCollectionPropertyAccessor

public XWorkCollectionPropertyAccessor()
Method Detail

setXWorkConverter

public void setXWorkConverter(XWorkConverter conv)

setObjectFactory

public void setObjectFactory(ObjectFactory fac)

setObjectTypeDeterminer

public void setObjectTypeDeterminer(ObjectTypeDeterminer ot)

getProperty

public java.lang.Object getProperty(java.util.Map context,
                                    java.lang.Object target,
                                    java.lang.Object key)
                             throws ognl.OgnlException
Gets the property of a Collection by indexing the collection based on a key property. For example, if the key property were 'id', this method would convert the key Object to whatever type the id property was, and then access the Set like it was a Map returning a JavaBean with the value of id property matching the input.

Specified by:
getProperty in interface ognl.PropertyAccessor
Overrides:
getProperty in class ognl.SetPropertyAccessor
Throws:
ognl.OgnlException
See Also:
PropertyAccessor.getProperty(java.util.Map, Object, Object)

getPropertyThroughIteration

public java.lang.Object getPropertyThroughIteration(java.util.Map context,
                                                    java.util.Collection collection,
                                                    java.lang.String property,
                                                    java.lang.Object key)
                                             throws ognl.OgnlException
Throws:
ognl.OgnlException

setProperty

public void setProperty(java.util.Map arg0,
                        java.lang.Object arg1,
                        java.lang.Object arg2,
                        java.lang.Object arg3)
                 throws ognl.OgnlException
Specified by:
setProperty in interface ognl.PropertyAccessor
Overrides:
setProperty in class ognl.ObjectPropertyAccessor
Throws:
ognl.OgnlException


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