org.apache.axis2.jaxws.wrapper.impl
Class JAXBWrapperToolImpl

java.lang.Object
  extended by org.apache.axis2.jaxws.wrapper.impl.JAXBWrapperToolImpl
All Implemented Interfaces:
JAXBWrapperTool

public class JAXBWrapperToolImpl
extends java.lang.Object
implements JAXBWrapperTool

The JAXBWrapper tool is used to create a JAXB Object from a series of child objects (wrap) or get the child objects from a JAXB Object (unwrap)


Constructor Summary
JAXBWrapperToolImpl()
           
 
Method Summary
 java.lang.Object[] unWrap(java.lang.Object jaxbObject, java.util.List<java.lang.String> childNames)
          unwrap Returns the list of child objects of the jaxb object
 java.lang.Object[] unWrap(java.lang.Object jaxbObject, java.util.List<java.lang.String> childNames, java.util.Map<java.lang.String,PropertyDescriptorPlus> pdMap)
          unwrap Returns the list of child objects of the jaxb object
 java.lang.Object wrap(java.lang.Class jaxbClass, java.util.List<java.lang.String> childNames, java.util.Map<java.lang.String,java.lang.Object> childObjects)
          wrap Creates a jaxb object that is initialized with the child objects.
 java.lang.Object wrap(java.lang.Class jaxbClass, java.util.List<java.lang.String> childNames, java.util.Map<java.lang.String,java.lang.Object> childObjects, java.util.Map<java.lang.String,PropertyDescriptorPlus> pdMap)
          wrap Creates a jaxb object that is initialized with the child objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JAXBWrapperToolImpl

public JAXBWrapperToolImpl()
Method Detail

unWrap

public java.lang.Object[] unWrap(java.lang.Object jaxbObject,
                                 java.util.List<java.lang.String> childNames,
                                 java.util.Map<java.lang.String,PropertyDescriptorPlus> pdMap)
                          throws JAXBWrapperException
unwrap Returns the list of child objects of the jaxb object

Specified by:
unWrap in interface JAXBWrapperTool
Parameters:
jaxbObject - that represents the type
childNames - list of xml child names as String
pdMap - PropertyDescriptor map for this jaxbObject
Returns:
list of Objects in the same order as the element names.
Throws:
JAXBWrapperException

wrap

public java.lang.Object wrap(java.lang.Class jaxbClass,
                             java.util.List<java.lang.String> childNames,
                             java.util.Map<java.lang.String,java.lang.Object> childObjects,
                             java.util.Map<java.lang.String,PropertyDescriptorPlus> pdMap)
                      throws JAXBWrapperException
wrap Creates a jaxb object that is initialized with the child objects.

Note that the jaxbClass must be the class the represents the complexType. (It should never be JAXBElement)

Specified by:
wrap in interface JAXBWrapperTool
Parameters:
jaxbClass -
childNames - list of xml child names as String
childObjects, - component type objects
pdMap - PropertyDescriptor map for this jaxbObject
Throws:
JAXBWrapperException

unWrap

public java.lang.Object[] unWrap(java.lang.Object jaxbObject,
                                 java.util.List<java.lang.String> childNames)
                          throws JAXBWrapperException
Description copied from interface: JAXBWrapperTool
unwrap Returns the list of child objects of the jaxb object

Specified by:
unWrap in interface JAXBWrapperTool
Parameters:
jaxbObject - that represents the type
childNames - list of xml child names as String
Returns:
list of Objects in the same order as the element names. Note: This method creates a PropertyDescriptor map; thus it is less performant than the other unWrap method
Throws:
JAXBWrapperException

wrap

public java.lang.Object wrap(java.lang.Class jaxbClass,
                             java.util.List<java.lang.String> childNames,
                             java.util.Map<java.lang.String,java.lang.Object> childObjects)
                      throws JAXBWrapperException
Description copied from interface: JAXBWrapperTool
wrap Creates a jaxb object that is initialized with the child objects.

Note that the jaxbClass must be the class the represents the complexType. (It should never be JAXBElement)

Specified by:
wrap in interface JAXBWrapperTool
childNames - list of xml child names as String
Throws:
JAXBWrapperException


Copyright © 2007 Apache Web Services Project. All Rights Reserved.