Package org.apache.cxf.jaxb
Class JAXBDataBinding
java.lang.Object
org.apache.cxf.databinding.AbstractDataBinding
org.apache.cxf.databinding.AbstractInterceptorProvidingDataBinding
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.AbstractInterceptorProvidingDataBinding
implements org.apache.cxf.databinding.WrapperCapableDatabinding, org.apache.cxf.interceptor.InterceptorProvider
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class org.apache.cxf.databinding.AbstractInterceptorProvidingDataBinding
inFaultInterceptors, inInterceptors, outFaultInterceptors, outInterceptorsFields inherited from class org.apache.cxf.databinding.AbstractDataBinding
mtomEnabled, mtomThreshold -
Constructor Summary
ConstructorsConstructorDescriptionJAXBDataBinding(boolean q) JAXBDataBinding(boolean qualified, Map<String, Object> props) JAXBDataBinding(jakarta.xml.bind.JAXBContext context) JAXBDataBinding(Class<?>... classes) -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyEscapeHandler(boolean escape, Consumer<Object> consumer) jakarta.xml.bind.JAXBContextcreateJAXBContext(Set<Class<?>> classes) jakarta.xml.bind.JAXBContextcreateJAXBContext(Set<Class<?>> classes, String defaultNs) org.apache.cxf.common.jaxb.JAXBContextCache.CachedContextAndSchemascreateJAXBContextAndSchemas(Set<Class<?>> classes, String defaultNs) <T> org.apache.cxf.databinding.DataReader<T>createReader(Class<T> c) org.apache.cxf.databinding.WrapperHelpercreateWrapperHelper(Class<?> wrapperType, QName wrapperName, List<String> partNames, List<String> elTypeNames, List<Class<?>> partClasses) <T> org.apache.cxf.databinding.DataWriter<T>createWriter(Class<T> c) List<jakarta.xml.bind.annotation.adapters.XmlAdapter<?,?>> jakarta.xml.bind.JAXBContextReturn a map of properties.Class<?>[]jakarta.xml.bind.Marshaller.ListenerReturns the Marshaller.Listener that will be registered on the MarshallersReturn a map of properties.protected StringgetNamespaceToUse(org.apache.cxf.service.Service service) protected booleanClass<?>[]Class<?>[]jakarta.xml.bind.Unmarshaller.ListenerReturns the Unmarshaller.Listener that will be registered on the UnmarshallersReturn a map of properties.jakarta.xml.bind.ValidationEventHandlervoidinitialize(org.apache.cxf.service.Service service) static booleanisInBuiltInSchemas(DOMResult schema) booleanprotected voidjustCheckForJAXBAnnotations(org.apache.cxf.service.model.ServiceInfo serviceInfo) voidsetConfiguredXmlAdapters(List<jakarta.xml.bind.annotation.adapters.XmlAdapter<?, ?>> adpters) final voidsetContext(jakarta.xml.bind.JAXBContext ctx) voidsetContextProperties(Map<String, Object> contextProperties) Set a map of JAXB context properties.voidsetEscapeHandler(Object handler) voidsetExtraClass(Class<?>[] userExtraClass) voidsetMarshallerListener(jakarta.xml.bind.Marshaller.Listener marshallerListener) Sets the Marshaller.Listener that will be registered on the MarshallersvoidsetMarshallerProperties(Map<String, Object> marshallerProperties) Set a map of JAXB marshaller properties.voidsetUnmarshallerListener(jakarta.xml.bind.Unmarshaller.Listener unmarshallerListener) Sets the Unmarshaller.Listener that will be registered on the UnmarshallersvoidsetUnmarshallerProperties(Map<String, Object> unmarshallerProperties) Set a map of JAXB unmarshaller properties.voidsetUnwrapJAXBElement(boolean unwrapJAXBElement) voidsetValidationEventHandler(jakarta.xml.bind.ValidationEventHandler validationEventHandler) Methods inherited from class org.apache.cxf.databinding.AbstractInterceptorProvidingDataBinding
getInFaultInterceptors, getInInterceptors, getOutFaultInterceptors, getOutInterceptorsMethods inherited from class org.apache.cxf.databinding.AbstractDataBinding
addSchemaDocument, addSchemaDocument, checkNamespaceMap, getBus, getContextualNamespaceMap, getDeclaredNamespaceMappings, getMtomThreshold, getNamespaceMap, getSchemas, isMtomEnabled, setBus, setContextualNamespaceMap, setMtomEnabled, setMtomThreshold, setNamespaceMap, setSchemas, updateSchemaLocationMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.cxf.interceptor.InterceptorProvider
getInFaultInterceptors, getInInterceptors, getOutFaultInterceptors, getOutInterceptors
-
Field Details
-
READER_VALIDATION_EVENT_HANDLER
- See Also:
-
VALIDATION_EVENT_HANDLER
- See Also:
-
SET_VALIDATION_EVENT_HANDLER
- See Also:
-
WRITER_VALIDATION_EVENT_HANDLER
- See Also:
-
SCHEMA_RESOURCE
- See Also:
-
MTOM_THRESHOLD
- See Also:
-
UNWRAP_JAXB_ELEMENT
- See Also:
-
USE_JAXB_BRIDGE
- See Also:
-
JAXB_SCAN_PACKAGES
- See Also:
-
-
Constructor Details
-
JAXBDataBinding
public JAXBDataBinding() -
JAXBDataBinding
public JAXBDataBinding(boolean q) -
JAXBDataBinding
- Throws:
jakarta.xml.bind.JAXBException
-
JAXBDataBinding
public JAXBDataBinding(boolean qualified, Map<String, Object> props) throws jakarta.xml.bind.JAXBException- Throws:
jakarta.xml.bind.JAXBException
-
JAXBDataBinding
public JAXBDataBinding(jakarta.xml.bind.JAXBContext context)
-
-
Method Details
-
getQualifiedSchemas
protected boolean getQualifiedSchemas() -
getContext
public jakarta.xml.bind.JAXBContext getContext() -
setContext
public final void setContext(jakarta.xml.bind.JAXBContext ctx) -
getEscapeHandler
-
setEscapeHandler
-
applyEscapeHandler
-
createWriter
- Specified by:
createWriterin interfaceorg.apache.cxf.databinding.DataBinding
-
getSupportedWriterFormats
- Specified by:
getSupportedWriterFormatsin interfaceorg.apache.cxf.databinding.DataBinding
-
createReader
- Specified by:
createReaderin interfaceorg.apache.cxf.databinding.DataBinding
-
getSupportedReaderFormats
- Specified by:
getSupportedReaderFormatsin interfaceorg.apache.cxf.databinding.DataBinding
-
initialize
public void initialize(org.apache.cxf.service.Service service) - Specified by:
initializein interfaceorg.apache.cxf.databinding.DataBinding
-
justCheckForJAXBAnnotations
protected void justCheckForJAXBAnnotations(org.apache.cxf.service.model.ServiceInfo serviceInfo) -
getNamespaceToUse
-
setExtraClass
-
getExtraClass
-
createJAXBContext
public jakarta.xml.bind.JAXBContext createJAXBContext(Set<Class<?>> classes) throws jakarta.xml.bind.JAXBException - Throws:
jakarta.xml.bind.JAXBException
-
createJAXBContext
public jakarta.xml.bind.JAXBContext createJAXBContext(Set<Class<?>> classes, String defaultNs) throws jakarta.xml.bind.JAXBException - Throws:
jakarta.xml.bind.JAXBException
-
createJAXBContextAndSchemas
public org.apache.cxf.common.jaxb.JAXBContextCache.CachedContextAndSchemas createJAXBContextAndSchemas(Set<Class<?>> classes, String defaultNs) throws jakarta.xml.bind.JAXBException - Throws:
jakarta.xml.bind.JAXBException
-
getContextClasses
-
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
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.
-
getConfiguredXmlAdapters
-
setConfiguredXmlAdapters
public void setConfiguredXmlAdapters(List<jakarta.xml.bind.annotation.adapters.XmlAdapter<?, ?>> adpters) -
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
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
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
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 jakarta.xml.bind.Unmarshaller.Listener getUnmarshallerListener()Returns the Unmarshaller.Listener that will be registered on the Unmarshallers- Returns:
-
setUnmarshallerListener
public void setUnmarshallerListener(jakarta.xml.bind.Unmarshaller.Listener unmarshallerListener) Sets the Unmarshaller.Listener that will be registered on the Unmarshallers- Parameters:
unmarshallerListener-
-
getMarshallerListener
public jakarta.xml.bind.Marshaller.Listener getMarshallerListener()Returns the Marshaller.Listener that will be registered on the Marshallers- Returns:
-
setMarshallerListener
public void setMarshallerListener(jakarta.xml.bind.Marshaller.Listener marshallerListener) Sets the Marshaller.Listener that will be registered on the Marshallers- Parameters:
marshallerListener-
-
getValidationEventHandler
public jakarta.xml.bind.ValidationEventHandler getValidationEventHandler() -
setValidationEventHandler
public void setValidationEventHandler(jakarta.xml.bind.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:
createWrapperHelperin interfaceorg.apache.cxf.databinding.WrapperCapableDatabinding
-
isInBuiltInSchemas
-