org.apache.cxf.jaxrs.provider
Class AtomPojoProvider
java.lang.Object
org.apache.cxf.jaxrs.provider.AbstractConfigurableProvider
org.apache.cxf.jaxrs.provider.AtomPojoProvider
- All Implemented Interfaces:
- javax.ws.rs.ext.MessageBodyReader<Object>, javax.ws.rs.ext.MessageBodyWriter<Object>
@Provider
public class AtomPojoProvider
- extends AbstractConfigurableProvider
- implements javax.ws.rs.ext.MessageBodyWriter<Object>, javax.ws.rs.ext.MessageBodyReader<Object>
Method Summary |
protected boolean |
buildEntry(Entry entry,
Object o)
|
protected boolean |
buildFeed(Feed feed,
Object o)
|
protected void |
createEntryContent(Entry e,
Object o,
Class<?> cls)
|
protected Entry |
createEntryFromObject(Object o,
Class<?> cls)
|
protected Feed |
createFeedFromCollectionWrapper(Object o)
|
long |
getSize(Object t,
Class<?> type,
Type genericType,
Annotation[] annotations,
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 |
setAtomReaders(Map<String,AtomElementReader<?,?>> readers)
|
void |
setAtomWriters(Map<String,AtomElementWriter<?,?>> writers)
|
void |
setCollectionGetters(Map<String,String> methods)
|
void |
setCollectionSetters(Map<String,String> methods)
|
protected void |
setEntryProperties(Factory factory,
Entry entry,
Object o,
Class<?> cls)
|
protected void |
setFeedFromCollection(Factory factory,
Feed feed,
Object wrapper,
Object collection,
Class<?> collectionCls,
Type collectionType,
boolean writerUsed)
|
protected void |
setFeedProperties(Factory factory,
Feed feed,
Object wrapper,
Object collection,
Class<?> collectionCls,
Type collectionType)
|
void |
setFormattedOutput(boolean formattedOutput)
|
void |
setMessageContext(MessageContext context)
|
protected void |
tryInjectMessageContext(Object handler)
|
void |
writeTo(Object o,
Class<?> clazz,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mt,
javax.ws.rs.core.MultivaluedMap<String,Object> headers,
OutputStream os)
|
Methods inherited from class org.apache.cxf.jaxrs.provider.AbstractConfigurableProvider |
getBus, getConsumeMediaTypes, getEnableBuffering, getEnableStreaming, getProduceMediaTypes, init, setBus, setConsumeMediaTypes, setEnableBuffering, setEnableStreaming, setProduceMediaTypes |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AtomPojoProvider
public AtomPojoProvider()
setMessageContext
@Context
public void setMessageContext(MessageContext context)
tryInjectMessageContext
protected void tryInjectMessageContext(Object handler)
getSize
public long getSize(Object t,
Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mt)
- Specified by:
getSize
in interface javax.ws.rs.ext.MessageBodyWriter<Object>
setCollectionGetters
public void setCollectionGetters(Map<String,String> methods)
setCollectionSetters
public void setCollectionSetters(Map<String,String> methods)
isWriteable
public boolean isWriteable(Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mt)
- Specified by:
isWriteable
in interface javax.ws.rs.ext.MessageBodyWriter<Object>
writeTo
public void writeTo(Object o,
Class<?> clazz,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mt,
javax.ws.rs.core.MultivaluedMap<String,Object> headers,
OutputStream os)
throws IOException
- Specified by:
writeTo
in interface javax.ws.rs.ext.MessageBodyWriter<Object>
- Throws:
IOException
setFormattedOutput
public void setFormattedOutput(boolean formattedOutput)
createFeedFromCollectionWrapper
protected Feed createFeedFromCollectionWrapper(Object o)
throws Exception
- Throws:
Exception
buildFeed
protected boolean buildFeed(Feed feed,
Object o)
setFeedFromCollection
protected void setFeedFromCollection(Factory factory,
Feed feed,
Object wrapper,
Object collection,
Class<?> collectionCls,
Type collectionType,
boolean writerUsed)
throws Exception
- Throws:
Exception
setFeedProperties
protected void setFeedProperties(Factory factory,
Feed feed,
Object wrapper,
Object collection,
Class<?> collectionCls,
Type collectionType)
createEntryFromObject
protected Entry createEntryFromObject(Object o,
Class<?> cls)
throws Exception
- Throws:
Exception
buildEntry
protected boolean buildEntry(Entry entry,
Object o)
createEntryContent
protected void createEntryContent(Entry e,
Object o,
Class<?> cls)
throws Exception
- Throws:
Exception
setEntryProperties
protected void setEntryProperties(Factory factory,
Entry entry,
Object o,
Class<?> cls)
setAtomWriters
public void setAtomWriters(Map<String,AtomElementWriter<?,?>> writers)
setAtomReaders
public void setAtomReaders(Map<String,AtomElementReader<?,?>> readers)
setAtomBuilders
public void setAtomBuilders(Map<String,AbstractAtomElementBuilder<?>> builders)
isReadable
public boolean isReadable(Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType)
- Specified by:
isReadable
in interface javax.ws.rs.ext.MessageBodyReader<Object>
readFrom
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
- Specified by:
readFrom
in interface javax.ws.rs.ext.MessageBodyReader<Object>
- Throws:
IOException
javax.ws.rs.WebApplicationException
Apache CXF