org.apache.cxf.jaxb
Class JAXBDataBinding

java.lang.Object
  extended by org.apache.cxf.databinding.AbstractDataBinding
      extended by org.apache.cxf.jaxb.JAXBDataBinding
All Implemented Interfaces:
org.apache.cxf.databinding.DataBinding, org.apache.cxf.databinding.WrapperCapableDatabinding, org.apache.cxf.interceptor.InterceptorProvider

public class JAXBDataBinding
extends org.apache.cxf.databinding.AbstractDataBinding
implements org.apache.cxf.databinding.WrapperCapableDatabinding, org.apache.cxf.interceptor.InterceptorProvider


Field Summary
static String JAXB_SCAN_PACKAGES
           
static String MTOM_THRESHOLD
           
static String READER_VALIDATION_EVENT_HANDLER
           
static String SCHEMA_RESOURCE
           
static String SET_VALIDATION_EVENT_HANDLER
           
static String UNWRAP_JAXB_ELEMENT
           
static String USE_JAXB_BRIDGE
           
static String VALIDATION_EVENT_HANDLER
           
static String WRITER_VALIDATION_EVENT_HANDLER
           
 
Fields inherited from class org.apache.cxf.databinding.AbstractDataBinding
mtomEnabled, mtomThreshold
 
Constructor Summary
JAXBDataBinding()
           
JAXBDataBinding(boolean q)
           
JAXBDataBinding(Class<?>... classes)
           
JAXBDataBinding(JAXBContext context)
           
JAXBDataBinding(org.apache.cxf.service.factory.ReflectionServiceFactoryBean b)
           
 
Method Summary
 JAXBContext createJAXBContext(Set<Class<?>> classes)
           
 JAXBContext createJAXBContext(Set<Class<?>> classes, String defaultNs)
           
 org.apache.cxf.common.jaxb.JAXBContextCache.CachedContextAndSchemas createJAXBContextAndSchemas(Set<Class<?>> classes, String defaultNs)
           
<T> org.apache.cxf.databinding.DataReader<T>
createReader(Class<T> c)
           
 org.apache.cxf.databinding.WrapperHelper createWrapperHelper(Class<?> wrapperType, QName wrapperName, List<String> partNames, List<String> elTypeNames, List<Class<?>> partClasses)
           
<T> org.apache.cxf.databinding.DataWriter<T>
createWriter(Class<T> c)
           
 JAXBContext getContext()
           
 Set<Class<?>> getContextClasses()
           
 Map<String,Object> getContextProperties()
          Return a map of properties.
 Class<?>[] getExtraClass()
           
 List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> getInFaultInterceptors()
           
 List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> getInInterceptors()
           
 Marshaller.Listener getMarshallerListener()
          Returns the Marshaller.Listener that will be registered on the Marshallers
 Map<String,Object> getMarshallerProperties()
          Return a map of properties.
 List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> getOutFaultInterceptors()
           
 List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> getOutInterceptors()
           
 Class<?>[] getSupportedReaderFormats()
           
 Class<?>[] getSupportedWriterFormats()
           
 Unmarshaller.Listener getUnmarshallerListener()
          Returns the Unmarshaller.Listener that will be registered on the Unmarshallers
 Map<String,Object> getUnmarshallerProperties()
          Return a map of properties.
 ValidationEventHandler getValidationEventHandler()
           
 void initialize(org.apache.cxf.service.Service service)
           
 boolean isUnwrapJAXBElement()
           
 void setContext(JAXBContext ctx)
           
 void setContextProperties(Map<String,Object> contextProperties)
          Set a map of JAXB context properties.
 void setExtraClass(Class<?>[] userExtraClass)
           
 void setMarshallerListener(Marshaller.Listener marshallerListener)
          Sets the Marshaller.Listener that will be registered on the Marshallers
 void setMarshallerProperties(Map<String,Object> marshallerProperties)
          Set a map of JAXB marshaller properties.
 void setUnmarshallerListener(Unmarshaller.Listener unmarshallerListener)
          Sets the Unmarshaller.Listener that will be registered on the Unmarshallers
 void setUnmarshallerProperties(Map<String,Object> unmarshallerProperties)
          Set a map of JAXB unmarshaller properties.
 void setUnwrapJAXBElement(boolean unwrapJAXBElement)
           
 void setValidationEventHandler(ValidationEventHandler validationEventHandler)
           
 
Methods inherited from class org.apache.cxf.databinding.AbstractDataBinding
addSchemaDocument, addSchemaDocument, checkNamespaceMap, getBus, getContextualNamespaceMap, getDeclaredNamespaceMappings, getMtomThreshold, getNamespaceMap, getSchemas, isMtomEnabled, setBus, setContextualNamespaceMap, setMtomEnabled, setMtomThreshold, setNamespaceMap, setSchemas, updateSchemaLocation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

READER_VALIDATION_EVENT_HANDLER

public static final String READER_VALIDATION_EVENT_HANDLER
See Also:
Constant Field Values

VALIDATION_EVENT_HANDLER

public static final String VALIDATION_EVENT_HANDLER
See Also:
Constant Field Values

SET_VALIDATION_EVENT_HANDLER

public static final String SET_VALIDATION_EVENT_HANDLER
See Also:
Constant Field Values

WRITER_VALIDATION_EVENT_HANDLER

public static final String WRITER_VALIDATION_EVENT_HANDLER
See Also:
Constant Field Values

SCHEMA_RESOURCE

public static final String SCHEMA_RESOURCE
See Also:
Constant Field Values

MTOM_THRESHOLD

public static final String MTOM_THRESHOLD
See Also:
Constant Field Values

UNWRAP_JAXB_ELEMENT

public static final String UNWRAP_JAXB_ELEMENT
See Also:
Constant Field Values

USE_JAXB_BRIDGE

public static final String USE_JAXB_BRIDGE
See Also:
Constant Field Values

JAXB_SCAN_PACKAGES

public static final String JAXB_SCAN_PACKAGES
See Also:
Constant Field Values
Constructor Detail

JAXBDataBinding

public JAXBDataBinding()

JAXBDataBinding

public JAXBDataBinding(boolean q)

JAXBDataBinding

public JAXBDataBinding(Class<?>... classes)
                throws JAXBException
Throws:
JAXBException

JAXBDataBinding

public JAXBDataBinding(org.apache.cxf.service.factory.ReflectionServiceFactoryBean b)
                throws JAXBException
Throws:
JAXBException

JAXBDataBinding

public JAXBDataBinding(JAXBContext context)
Method Detail

getContext

public JAXBContext getContext()

setContext

public final void setContext(JAXBContext ctx)

createWriter

public <T> org.apache.cxf.databinding.DataWriter<T> createWriter(Class<T> c)
Specified by:
createWriter in interface org.apache.cxf.databinding.DataBinding

getSupportedWriterFormats

public Class<?>[] getSupportedWriterFormats()
Specified by:
getSupportedWriterFormats in interface org.apache.cxf.databinding.DataBinding

createReader

public <T> org.apache.cxf.databinding.DataReader<T> createReader(Class<T> c)
Specified by:
createReader in interface org.apache.cxf.databinding.DataBinding

getSupportedReaderFormats

public Class<?>[] getSupportedReaderFormats()
Specified by:
getSupportedReaderFormats in interface org.apache.cxf.databinding.DataBinding

initialize

public void initialize(org.apache.cxf.service.Service service)
Specified by:
initialize in interface org.apache.cxf.databinding.DataBinding

setExtraClass

public void setExtraClass(Class<?>[] userExtraClass)

getExtraClass

public Class<?>[] getExtraClass()

createJAXBContext

public JAXBContext createJAXBContext(Set<Class<?>> classes)
                              throws JAXBException
Throws:
JAXBException

createJAXBContext

public JAXBContext createJAXBContext(Set<Class<?>> classes,
                                     String defaultNs)
                              throws JAXBException
Throws:
JAXBException

createJAXBContextAndSchemas

public org.apache.cxf.common.jaxb.JAXBContextCache.CachedContextAndSchemas createJAXBContextAndSchemas(Set<Class<?>> classes,
                                                                                                       String defaultNs)
                                                                                                throws JAXBException
Throws:
JAXBException

getContextClasses

public Set<Class<?>> getContextClasses()

getContextProperties

public Map<String,Object> getContextProperties()
Return a map of properties. These properties are passed to JAXBContext.newInstance when this object creates a context.

Returns:
the map of JAXB context properties.

setContextProperties

public void setContextProperties(Map<String,Object> contextProperties)
Set a map of JAXB context properties. These properties are passed to JAXBContext.newInstance when this object creates a context. Note that if you create a JAXB context elsewhere, you will not respect these properties unless you handle it manually.

Parameters:
contextProperties - map of properties.

getMarshallerProperties

public Map<String,Object> getMarshallerProperties()
Return a map of properties. These properties are set into the JAXB Marshaller (via Marshaller.setProperty(...) when the marshaller is created.

Returns:
the map of JAXB marshaller properties.

setMarshallerProperties

public void setMarshallerProperties(Map<String,Object> marshallerProperties)
Set a map of JAXB marshaller properties. These properties are set into the JAXB Marshaller (via Marshaller.setProperty(...) when the marshaller is created.

Parameters:
marshallerProperties - map of properties.

getUnmarshallerProperties

public Map<String,Object> getUnmarshallerProperties()
Return a map of properties. These properties are set into the JAXB Unmarshaller (via Unmarshaller.setProperty(...) when the unmarshaller is created.

Returns:
the map of JAXB unmarshaller properties.

setUnmarshallerProperties

public void setUnmarshallerProperties(Map<String,Object> unmarshallerProperties)
Set a map of JAXB unmarshaller properties. These properties are set into the JAXB Unmarshaller (via Unmarshaller.setProperty(...) when the unmarshaller is created.

Parameters:
unmarshallerProperties - map of properties.

getUnmarshallerListener

public Unmarshaller.Listener getUnmarshallerListener()
Returns the Unmarshaller.Listener that will be registered on the Unmarshallers

Returns:

setUnmarshallerListener

public void setUnmarshallerListener(Unmarshaller.Listener unmarshallerListener)
Sets the Unmarshaller.Listener that will be registered on the Unmarshallers

Parameters:
unmarshallerListener -

getMarshallerListener

public Marshaller.Listener getMarshallerListener()
Returns the Marshaller.Listener that will be registered on the Marshallers

Returns:

setMarshallerListener

public void setMarshallerListener(Marshaller.Listener marshallerListener)
Sets the Marshaller.Listener that will be registered on the Marshallers

Parameters:
marshallerListener -

getValidationEventHandler

public ValidationEventHandler getValidationEventHandler()

setValidationEventHandler

public void setValidationEventHandler(ValidationEventHandler validationEventHandler)

isUnwrapJAXBElement

public boolean isUnwrapJAXBElement()

setUnwrapJAXBElement

public void setUnwrapJAXBElement(boolean unwrapJAXBElement)

createWrapperHelper

public org.apache.cxf.databinding.WrapperHelper createWrapperHelper(Class<?> wrapperType,
                                                                    QName wrapperName,
                                                                    List<String> partNames,
                                                                    List<String> elTypeNames,
                                                                    List<Class<?>> partClasses)
Specified by:
createWrapperHelper in interface org.apache.cxf.databinding.WrapperCapableDatabinding

getOutFaultInterceptors

public List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> getOutFaultInterceptors()
Specified by:
getOutFaultInterceptors in interface org.apache.cxf.interceptor.InterceptorProvider

getInFaultInterceptors

public List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> getInFaultInterceptors()
Specified by:
getInFaultInterceptors in interface org.apache.cxf.interceptor.InterceptorProvider

getInInterceptors

public List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> getInInterceptors()
Specified by:
getInInterceptors in interface org.apache.cxf.interceptor.InterceptorProvider

getOutInterceptors

public List<org.apache.cxf.interceptor.Interceptor<? extends org.apache.cxf.message.Message>> getOutInterceptors()
Specified by:
getOutInterceptors in interface org.apache.cxf.interceptor.InterceptorProvider


Apache CXF