org.apache.cxf.jaxrs.provider
Class XSLTJaxbProvider<T>
java.lang.Object
org.apache.cxf.jaxrs.provider.AbstractConfigurableProvider
org.apache.cxf.jaxrs.provider.AbstractJAXBProvider<T>
org.apache.cxf.jaxrs.provider.JAXBElementProvider<T>
org.apache.cxf.jaxrs.provider.XSLTJaxbProvider<T>
- All Implemented Interfaces:
- javax.ws.rs.ext.MessageBodyReader<T>, javax.ws.rs.ext.MessageBodyWriter<T>
@Produces(value={"application/xml","application/*+xml","text/xml","text/html"})
@Consumes(value={"application/xml","application/*+xml","text/xml","text/html"})
@Provider
public class XSLTJaxbProvider<T>
- extends JAXBElementProvider<T>
Fields inherited from class org.apache.cxf.jaxrs.provider.AbstractJAXBProvider |
BUNDLE, classContexts, collectionContextClasses, inAppendMap, inDropElements, inElementsMap, jaxbElementClassMap, marshalAsJaxbElement, NS_MAPPER_PROPERTY_RI, NS_MAPPER_PROPERTY_RI_INT, outAppendMap, outDropElements, outElementsMap, packageContexts, unmarshalAsJaxbElement, xmlTypeAsJaxbElementOnly |
Method Summary |
protected void |
addAttachmentMarshaller(Marshaller ms)
|
protected Templates |
createTemplates(InputStream is)
|
protected Templates |
createTemplates(String loc)
|
protected Templates |
createTemplates(Templates templates,
Map<String,Object> configuredParams,
Map<String,String> outProps)
|
protected Templates |
getAnnotationTemplates(Annotation[] anns)
|
protected Templates |
getInTemplates(Annotation[] anns,
javax.ws.rs.core.MediaType mt)
|
protected Templates |
getOutTemplates(Annotation[] anns,
javax.ws.rs.core.MediaType mt)
|
protected Templates |
getTemplatesFromAnnotation(Class<?> cls,
Annotation[] anns,
javax.ws.rs.core.MediaType mt)
|
protected XSLTTransform |
getXsltTransformAnn(Annotation[] anns,
javax.ws.rs.core.MediaType mt)
|
boolean |
inClassCanBeHandled(String className)
|
protected boolean |
inTemplatesAvailable(Class<?> cls,
Annotation[] anns,
javax.ws.rs.core.MediaType mt)
|
boolean |
isReadable(Class<?> type,
Type genericType,
Annotation[] anns,
javax.ws.rs.core.MediaType mt)
|
boolean |
isWriteable(Class<?> type,
Type genericType,
Annotation[] anns,
javax.ws.rs.core.MediaType mt)
|
protected void |
marshalToOutputStream(Marshaller ms,
Object obj,
OutputStream os,
Annotation[] anns,
javax.ws.rs.core.MediaType mt)
|
protected void |
marshalToWriter(Marshaller ms,
Object obj,
XMLStreamWriter writer,
Annotation[] anns,
javax.ws.rs.core.MediaType mt)
|
boolean |
outClassCanBeHandled(String className)
|
protected boolean |
outTemplatesAvailable(Class<?> cls,
Annotation[] anns,
javax.ws.rs.core.MediaType mt)
|
void |
setInClassNames(List<String> classNames)
|
void |
setInMediaTemplates(Map<String,String> map)
|
void |
setInParameters(Map<String,Object> inParams)
|
void |
setInProperties(Map<String,String> inProps)
|
void |
setInTemplate(String loc)
|
void |
setOutClassNames(List<String> classNames)
|
void |
setOutMediaTemplates(Map<String,String> map)
|
void |
setOutParameters(Map<String,Object> outParams)
|
void |
setOutProperties(Map<String,String> outProps)
|
void |
setOutTemplate(String loc)
|
void |
setResolver(URIResolver resolver)
|
void |
setSupportJaxbOnly(boolean support)
|
void |
setSystemId(String system)
|
protected Object |
unmarshalFromInputStream(Unmarshaller unmarshaller,
InputStream is,
Annotation[] anns,
javax.ws.rs.core.MediaType mt)
|
protected Object |
unmarshalFromReader(Unmarshaller unmarshaller,
XMLStreamReader reader,
Annotation[] anns,
javax.ws.rs.core.MediaType mt)
|
Methods inherited from class org.apache.cxf.jaxrs.provider.JAXBElementProvider |
addAttachmentUnmarshaller, canBeReadAsJaxbElement, doUnmarshal, getStreamReader, getStreamWriter, marshal, marshal, marshal, marshalCollection, marshalCollectionMember, objectFactoryOrIndexAvailable, readFrom, resolveXMLResourceURI, setConsumeMediaTypes, setEnableBuffering, setMarshallerProperties, setMessageContext, setNamespacePrefixes, setProduceMediaTypes, setSchemaLocation, setXmlPiProperty, setXmlPiPropertyName, setXmlResourceOffset, writeTo |
Methods inherited from class org.apache.cxf.jaxrs.provider.AbstractJAXBProvider |
checkAdapter, clearContexts, configureReaderRestrictions, convertToJaxbElementIfNeeded, createDepthReaderIfNeeded, createMarshaller, createTransformReaderIfNeeded, createTransformWriterIfNeeded, createUnmarshaller, createUnmarshaller, getActualType, getClassContext, getClassContext, getCollectionContext, getCollectionWrapperQName, getContext, getDepthProperties, getJAXBContext, getJaxbElementClass, getJaxbQName, getPackageContext, getPackageContext, getSchema, getSchema, getSize, getStackTrace, getStreamHandlerFromCurrentMessage, handleExceptionEnd, handleExceptionStart, handleJAXBException, handleXMLStreamException, init, isSkipJaxbChecks, isSupported, isXmlRoot, isXmlType, reportEmptyContentLength, setAttributesToElements, setCatalogLocation, setCollectionWrapperMap, setCollectionWrapperName, setContext, setContextProperties, setDepthProperties, setExtraClass, setInAppendElements, setInDropElements, setInTransformElements, setJaxbElementClassMap, setJaxbElementClassNames, setMarshallAsJaxbElement, setMarshallerListener, setMarshallerProp, setNamespaceMapper, setNamespaceMapperPropertyName, setOutAppendElements, setOutDropElements, setOutTransformElements, setSchema, setSchemaHandler, setSchemaHandlers, setSchemaLocations, setSingleJaxbContext, setSkipJaxbChecks, setUnmarshallAsJaxbElement, setUnmarshallerListener, setUnmarshallerProperties, setUseSingleContextForPackages, setValidateBeforeWrite, setValidateInput, setValidateOutput, setValidationHandler, setXmlRootAsJaxbElement, setXmlTypeAsJaxbElementOnly, validateObjectIfNeeded, writeTo |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XSLTJaxbProvider
public XSLTJaxbProvider()
setSupportJaxbOnly
public void setSupportJaxbOnly(boolean support)
isReadable
public boolean isReadable(Class<?> type,
Type genericType,
Annotation[] anns,
javax.ws.rs.core.MediaType mt)
- Specified by:
isReadable
in interface javax.ws.rs.ext.MessageBodyReader<T>
- Overrides:
isReadable
in class AbstractJAXBProvider<T>
isWriteable
public boolean isWriteable(Class<?> type,
Type genericType,
Annotation[] anns,
javax.ws.rs.core.MediaType mt)
- Specified by:
isWriteable
in interface javax.ws.rs.ext.MessageBodyWriter<T>
- Overrides:
isWriteable
in class AbstractJAXBProvider<T>
inTemplatesAvailable
protected boolean inTemplatesAvailable(Class<?> cls,
Annotation[] anns,
javax.ws.rs.core.MediaType mt)
outTemplatesAvailable
protected boolean outTemplatesAvailable(Class<?> cls,
Annotation[] anns,
javax.ws.rs.core.MediaType mt)
getTemplatesFromAnnotation
protected Templates getTemplatesFromAnnotation(Class<?> cls,
Annotation[] anns,
javax.ws.rs.core.MediaType mt)
getAnnotationTemplates
protected Templates getAnnotationTemplates(Annotation[] anns)
getXsltTransformAnn
protected XSLTTransform getXsltTransformAnn(Annotation[] anns,
javax.ws.rs.core.MediaType mt)
getInTemplates
protected Templates getInTemplates(Annotation[] anns,
javax.ws.rs.core.MediaType mt)
getOutTemplates
protected Templates getOutTemplates(Annotation[] anns,
javax.ws.rs.core.MediaType mt)
unmarshalFromInputStream
protected Object unmarshalFromInputStream(Unmarshaller unmarshaller,
InputStream is,
Annotation[] anns,
javax.ws.rs.core.MediaType mt)
throws JAXBException
- Overrides:
unmarshalFromInputStream
in class JAXBElementProvider<T>
- Throws:
JAXBException
unmarshalFromReader
protected Object unmarshalFromReader(Unmarshaller unmarshaller,
XMLStreamReader reader,
Annotation[] anns,
javax.ws.rs.core.MediaType mt)
throws JAXBException
- Overrides:
unmarshalFromReader
in class JAXBElementProvider<T>
- Throws:
JAXBException
marshalToWriter
protected void marshalToWriter(Marshaller ms,
Object obj,
XMLStreamWriter writer,
Annotation[] anns,
javax.ws.rs.core.MediaType mt)
throws Exception
- Overrides:
marshalToWriter
in class JAXBElementProvider<T>
- Throws:
Exception
addAttachmentMarshaller
protected void addAttachmentMarshaller(Marshaller ms)
- Overrides:
addAttachmentMarshaller
in class JAXBElementProvider<T>
marshalToOutputStream
protected void marshalToOutputStream(Marshaller ms,
Object obj,
OutputStream os,
Annotation[] anns,
javax.ws.rs.core.MediaType mt)
throws Exception
- Overrides:
marshalToOutputStream
in class JAXBElementProvider<T>
- Throws:
Exception
setOutTemplate
public void setOutTemplate(String loc)
setInTemplate
public void setInTemplate(String loc)
setInMediaTemplates
public void setInMediaTemplates(Map<String,String> map)
setOutMediaTemplates
public void setOutMediaTemplates(Map<String,String> map)
setResolver
public void setResolver(URIResolver resolver)
setSystemId
public void setSystemId(String system)
setInParameters
public void setInParameters(Map<String,Object> inParams)
setOutParameters
public void setOutParameters(Map<String,Object> outParams)
setInProperties
public void setInProperties(Map<String,String> inProps)
setOutProperties
public void setOutProperties(Map<String,String> outProps)
setInClassNames
public void setInClassNames(List<String> classNames)
inClassCanBeHandled
public boolean inClassCanBeHandled(String className)
setOutClassNames
public void setOutClassNames(List<String> classNames)
outClassCanBeHandled
public boolean outClassCanBeHandled(String className)
createTemplates
protected Templates createTemplates(Templates templates,
Map<String,Object> configuredParams,
Map<String,String> outProps)
createTemplates
protected Templates createTemplates(String loc)
createTemplates
protected Templates createTemplates(InputStream is)
Apache CXF