org.apache.axis2.jaxws.wrapper
Interface JAXBWrapperTool

All Known Implementing Classes:
JAXBWrapperToolImpl

public interface 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)


Method Summary
 Object[] unWrap(Object jaxbObject, List<String> childNames)
          unwrap Returns the list of child objects of the jaxb object
 Object[] unWrap(Object jaxbObject, List<String> childNames, Map<String,PropertyDescriptorPlus> pdMap)
          unwrap Returns the list of child objects of the jaxb object
 Object unWrap(Object jaxbObject, String childName, PropertyDescriptorPlus pd)
          Short cut if there is only one Object in the JAXB Object
 Object wrap(Class jaxbClass, List<String> childNames, Map<String,Object> childObjects)
          wrap Creates a jaxb object that is initialized with the child objects.
 Object wrap(Class jaxbClass, List<String> childNames, Map<String,Object> childObjects, Map<String,Class> declaredClassMap, Map<String,PropertyDescriptorPlus> pdMap)
          wrap Creates a jaxb object that is initialized with the child objects.
 Object wrap(Class jaxbClass, String childName, Object childObject, Class declaredClass, PropertyDescriptorPlus pd)
          Short Cut for JAXB objects with one child wrap Creates a jaxb object that is initialized with one child object.
 

Method Detail

unWrap

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

Parameters:
jaxbObject - that represents the type
childNames - list of xml child names as String
pdMap - PropertyDescriptorMap describing the jaxbObject
Returns:
list of Objects in the same order as the element names.
Throws:
JAXBWrapperException

unWrap

Object[] unWrap(Object jaxbObject,
                List<String> childNames)
                throws JAXBWrapperException
unwrap Returns the list of child objects of the jaxb object

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

unWrap

Object unWrap(Object jaxbObject,
              String childName,
              PropertyDescriptorPlus pd)
              throws JAXBWrapperException
Short cut if there is only one Object in the JAXB Object

Parameters:
jaxbObject - that represents the type
childName - xml child names as String
pd - PropertyDescriptor
Returns:
child Object value
Throws:
JAXBWrapperException

wrap

Object wrap(Class jaxbClass,
            List<String> childNames,
            Map<String,Object> childObjects,
            Map<String,Class> declaredClassMap,
            Map<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)

Parameters:
jaxbClass -
childNames - list of xml child names as String
childObjects, - component type objects
pdMap - PropertyDescriptorMap describing the jaxbObject
Throws:
JAXBWrapperException

wrap

Object wrap(Class jaxbClass,
            List<String> childNames,
            Map<String,Object> childObjects)
            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)

Parameters:
jaxbClass -
childNames - list of xml child names as String
childObjects, - component type objects
pdMap - PropertyDescriptorMap describing the jaxbObject Note: This method creates a PropertyDescriptor map; thus it is less performant than the other unWrap method
Throws:
JAXBWrapperException

wrap

Object wrap(Class jaxbClass,
            String childName,
            Object childObject,
            Class declaredClass,
            PropertyDescriptorPlus pd)
            throws JAXBWrapperException
Short Cut for JAXB objects with one child wrap Creates a jaxb object that is initialized with one child object.

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

Parameters:
jaxbClass -
childName - xml child name as String or null if no child
childObject - component type object
declaredClass - declared class
pd - PropertyDescriptor for this jaxbObject
Throws:
JAXBWrapperException


Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.