org.jboss.seam.remoting.wrapper
Class BeanWrapper

java.lang.Object
  extended by org.jboss.seam.remoting.wrapper.BaseWrapper
      extended by org.jboss.seam.remoting.wrapper.BeanWrapper
All Implemented Interfaces:
Wrapper

public class BeanWrapper
extends BaseWrapper
implements Wrapper

Author:
Shane Bryzak

Field Summary
 
Fields inherited from class org.jboss.seam.remoting.wrapper.BaseWrapper
beanManager, context, element, path, value
 
Constructor Summary
BeanWrapper(BeanManager beanManager)
           
 
Method Summary
 ConversionScore conversionScore(Class<?> cls)
          Returns a score indicating whether this parameter value can be converted to the specified type.
 Object convert(Type type)
          Convert the wrapped parameter value to the specified target class.
 Wrapper getBeanProperty(String propertyName)
           
 Type getBeanPropertyType(String propertyName)
           
 void marshal(OutputStream out)
          Writes the object reference ID to the specified OutputStream
 void serialize(OutputStream out)
          Default implementation does nothing
 void serialize(OutputStream out, List<String> constraints)
          Writes a serialized representation of the object's properties to the specified OutputStream.
 void setBeanProperty(String propertyName, Wrapper valueWrapper)
           
 void setElement(org.dom4j.Element element)
          Extracts a value from a DOM4J Element
 void unmarshal()
          Default implementation does nothing
 
Methods inherited from class org.jboss.seam.remoting.wrapper.BaseWrapper
getValue, setCallContext, setPath, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.seam.remoting.wrapper.Wrapper
getValue, setCallContext, setPath, setValue
 

Constructor Detail

BeanWrapper

public BeanWrapper(BeanManager beanManager)
Method Detail

setElement

public void setElement(org.dom4j.Element element)
Description copied from class: BaseWrapper
Extracts a value from a DOM4J Element

Specified by:
setElement in interface Wrapper
Overrides:
setElement in class BaseWrapper
Parameters:
element - Element

getBeanPropertyType

public Type getBeanPropertyType(String propertyName)

getBeanProperty

public Wrapper getBeanProperty(String propertyName)

setBeanProperty

public void setBeanProperty(String propertyName,
                            Wrapper valueWrapper)

unmarshal

public void unmarshal()
Description copied from class: BaseWrapper
Default implementation does nothing

Specified by:
unmarshal in interface Wrapper
Overrides:
unmarshal in class BaseWrapper

convert

public Object convert(Type type)
               throws ConversionException
Description copied from interface: Wrapper
Convert the wrapped parameter value to the specified target class.

Specified by:
convert in interface Wrapper
Throws:
ConversionException

marshal

public void marshal(OutputStream out)
             throws IOException
Writes the object reference ID to the specified OutputStream

Specified by:
marshal in interface Wrapper
Throws:
IOException

serialize

public void serialize(OutputStream out)
               throws IOException
Description copied from class: BaseWrapper
Default implementation does nothing

Specified by:
serialize in interface Wrapper
Overrides:
serialize in class BaseWrapper
Parameters:
out - OutputStream
Throws:
IOException

serialize

public void serialize(OutputStream out,
                      List<String> constraints)
               throws IOException
Writes a serialized representation of the object's properties to the specified OutputStream.

Parameters:
out -
constraints -
Throws:
IOException

conversionScore

public ConversionScore conversionScore(Class<?> cls)
Description copied from interface: Wrapper
Returns a score indicating whether this parameter value can be converted to the specified type. This helper method is used to determine which (possibly overloaded) method of a component can/should be called.

0 - Cannot be converted 1 - Can be converted to this type 2 - Param is this exact type

Specified by:
conversionScore in interface Wrapper


Copyright © 2011 Seam Framework. All Rights Reserved.