@Produces(value={"application/atom+xml","application/atom+xml;type=feed","application/atom+xml;type=entry"}) @Consumes(value={"application/atom+xml","application/atom+xml;type=feed","application/atom+xml;type=entry"}) @Provider public class AtomPojoProvider extends AbstractConfigurableProvider implements javax.ws.rs.ext.MessageBodyWriter<Object>, javax.ws.rs.ext.MessageBodyReader<Object>
BUNDLE
Constructor and Description |
---|
AtomPojoProvider() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
buildEntry(org.apache.abdera.model.Entry entry,
Object o,
Class<?> pojoClass) |
protected <X> boolean |
buildFeed(org.apache.abdera.model.Feed feed,
X o,
Class<?> pojoClass) |
protected void |
createEntryContent(org.apache.abdera.factory.Factory factory,
org.apache.abdera.model.Entry e,
Object o,
Class<?> cls) |
protected org.apache.abdera.model.Entry |
createEntryFromObject(org.apache.abdera.factory.Factory factory,
Object o,
Class<?> cls) |
protected org.apache.abdera.model.Feed |
createFeedFromCollectionWrapper(org.apache.abdera.factory.Factory factory,
Object o,
Class<?> pojoClass) |
protected org.apache.abdera.writer.Writer |
createWriter(String writerName) |
protected AbstractAtomElementBuilder<?> |
getAtomBuilder(Class<?> pojoClass) |
protected <T> T |
getAtomElementHandler(Map<String,T> handlers,
Class<?> pojoClass) |
protected AtomElementReader<?,?> |
getAtomReader(Class<?> pojoClass) |
protected AtomElementWriter<?,?> |
getAtomWriter(Class<?> pojoClass) |
long |
getSize(Object t,
Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mt) |
protected boolean |
isFeedRequested(javax.ws.rs.core.MediaType mt) |
boolean |
isReadable(Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType) |
boolean |
isWriteable(Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mt) |
Object |
readFrom(Class<Object> cls,
Type type,
Annotation[] anns,
javax.ws.rs.core.MediaType mt,
javax.ws.rs.core.MultivaluedMap<String,String> headers,
InputStream is) |
void |
setAtomBuilders(Map<String,AbstractAtomElementBuilder<?>> builders) |
void |
setAtomClassBuilders(Map<Class<?>,AbstractAtomElementBuilder<?>> builders) |
void |
setAtomClassReaders(Map<Class<?>,AtomElementReader<?,?>> readers) |
void |
setAtomClassWriters(Map<Class<?>,AtomElementWriter<?,?>> writers) |
void |
setAtomReaders(Map<String,AtomElementReader<?,?>> readers) |
void |
setAtomWriters(Map<String,AtomElementWriter<?,?>> writers) |
void |
setAutodetectCharset(boolean autodetectCharset) |
void |
setCollectionGetters(Map<String,String> methods) |
void |
setCollectionSetters(Map<String,String> methods) |
protected void |
setEntryContent(org.apache.abdera.factory.Factory factory,
org.apache.abdera.model.Entry e,
String content) |
void |
setEntryContentMethodName(String name) |
protected void |
setEntryProperties(org.apache.abdera.factory.Factory factory,
org.apache.abdera.model.Entry entry,
Object o,
Class<?> cls) |
protected void |
setFeedFromCollection(org.apache.abdera.factory.Factory factory,
org.apache.abdera.model.Feed feed,
Object wrapper,
Class<?> wrapperCls,
Object collection,
Class<?> collectionCls,
Type collectionType,
boolean writerUsed) |
protected void |
setFeedProperties(org.apache.abdera.factory.Factory factory,
org.apache.abdera.model.Feed feed,
Object wrapper,
Class<?> wrapperCls,
Object collection,
Class<?> collectionCls,
Type collectionType) |
void |
setFormattedOutput(boolean formattedOutput) |
void |
setMessageContext(MessageContext context) |
void |
setUseJaxbForContent(boolean use) |
protected void |
tryInjectMessageContext(Object handler) |
void |
writeTo(Object o,
Class<?> cls,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mt,
javax.ws.rs.core.MultivaluedMap<String,Object> headers,
OutputStream os) |
getBus, getConsumeMediaTypes, getEnableBuffering, getEnableStreaming, getProduceMediaTypes, init, isPayloadEmpty, isPayloadEmpty, reportEmptyContentLength, setBus, setConsumeMediaTypes, setEnableBuffering, setEnableStreaming, setProduceMediaTypes
public void setUseJaxbForContent(boolean use)
public void setEntryContentMethodName(String name)
@Context public void setMessageContext(MessageContext context)
protected void tryInjectMessageContext(Object handler)
public long getSize(Object t, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mt)
getSize
in interface javax.ws.rs.ext.MessageBodyWriter<Object>
public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mt)
isWriteable
in interface javax.ws.rs.ext.MessageBodyWriter<Object>
public void writeTo(Object o, Class<?> cls, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mt, javax.ws.rs.core.MultivaluedMap<String,Object> headers, OutputStream os) throws IOException
writeTo
in interface javax.ws.rs.ext.MessageBodyWriter<Object>
IOException
protected org.apache.abdera.writer.Writer createWriter(String writerName)
public void setFormattedOutput(boolean formattedOutput)
protected org.apache.abdera.model.Feed createFeedFromCollectionWrapper(org.apache.abdera.factory.Factory factory, Object o, Class<?> pojoClass) throws Exception
Exception
protected <X> boolean buildFeed(org.apache.abdera.model.Feed feed, X o, Class<?> pojoClass)
protected AtomElementWriter<?,?> getAtomWriter(Class<?> pojoClass)
protected AtomElementReader<?,?> getAtomReader(Class<?> pojoClass)
protected <T> T getAtomElementHandler(Map<String,T> handlers, Class<?> pojoClass)
protected void setFeedFromCollection(org.apache.abdera.factory.Factory factory, org.apache.abdera.model.Feed feed, Object wrapper, Class<?> wrapperCls, Object collection, Class<?> collectionCls, Type collectionType, boolean writerUsed) throws Exception
Exception
protected AbstractAtomElementBuilder<?> getAtomBuilder(Class<?> pojoClass)
protected void setFeedProperties(org.apache.abdera.factory.Factory factory, org.apache.abdera.model.Feed feed, Object wrapper, Class<?> wrapperCls, Object collection, Class<?> collectionCls, Type collectionType)
protected org.apache.abdera.model.Entry createEntryFromObject(org.apache.abdera.factory.Factory factory, Object o, Class<?> cls) throws Exception
Exception
protected boolean buildEntry(org.apache.abdera.model.Entry entry, Object o, Class<?> pojoClass)
protected void createEntryContent(org.apache.abdera.factory.Factory factory, org.apache.abdera.model.Entry e, Object o, Class<?> cls) throws Exception
Exception
protected void setEntryContent(org.apache.abdera.factory.Factory factory, org.apache.abdera.model.Entry e, String content)
protected void setEntryProperties(org.apache.abdera.factory.Factory factory, org.apache.abdera.model.Entry entry, Object o, Class<?> cls)
protected boolean isFeedRequested(javax.ws.rs.core.MediaType mt)
public void setAtomWriters(Map<String,AtomElementWriter<?,?>> writers)
public void setAtomReaders(Map<String,AtomElementReader<?,?>> readers)
public void setAtomBuilders(Map<String,AbstractAtomElementBuilder<?>> builders)
public void setAtomClassWriters(Map<Class<?>,AtomElementWriter<?,?>> writers)
public void setAtomClassReaders(Map<Class<?>,AtomElementReader<?,?>> readers)
public void setAtomClassBuilders(Map<Class<?>,AbstractAtomElementBuilder<?>> builders)
public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
isReadable
in interface javax.ws.rs.ext.MessageBodyReader<Object>
public Object readFrom(Class<Object> cls, Type type, Annotation[] anns, javax.ws.rs.core.MediaType mt, javax.ws.rs.core.MultivaluedMap<String,String> headers, InputStream is) throws IOException, javax.ws.rs.WebApplicationException
readFrom
in interface javax.ws.rs.ext.MessageBodyReader<Object>
IOException
javax.ws.rs.WebApplicationException
public void setAutodetectCharset(boolean autodetectCharset)
Apache CXF