Class MidpointAbstractProvider<T>
- java.lang.Object
-
- org.apache.cxf.jaxrs.provider.AbstractConfigurableProvider
-
- com.evolveum.midpoint.common.rest.MidpointAbstractProvider<T>
-
- All Implemented Interfaces:
javax.ws.rs.ext.MessageBodyReader<T>
,javax.ws.rs.ext.MessageBodyWriter<T>
- Direct Known Subclasses:
MidpointJsonProvider
,MidpointXmlProvider
,MidpointYamlProvider
public abstract class MidpointAbstractProvider<T> extends org.apache.cxf.jaxrs.provider.AbstractConfigurableProvider implements javax.ws.rs.ext.MessageBodyReader<T>, javax.ws.rs.ext.MessageBodyWriter<T>
-
-
Field Summary
Fields Modifier and Type Field Description protected LocalizationService
localizationService
protected PrismContext
prismContext
-
Constructor Summary
Constructors Constructor Description MidpointAbstractProvider()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract PrismParser
getParser(InputStream entityStream)
protected abstract PrismSerializer<String>
getSerializer()
long
getSize(T t, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
void
init(List<org.apache.cxf.jaxrs.model.ClassResourceInfo> cris)
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 mediaType)
T
readFrom(Class<T> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,String> httpHeaders, InputStream entityStream)
void
writeTo(T object, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders, OutputStream entityStream)
-
Methods inherited from class org.apache.cxf.jaxrs.provider.AbstractConfigurableProvider
getBus, getConsumeMediaTypes, getEnableBuffering, getEnableStreaming, getProduceMediaTypes, isPayloadEmpty, isPayloadEmpty, reportEmptyContentLength, setBus, setConsumeMediaTypes, setEnableBuffering, setEnableStreaming, setProduceMediaTypes
-
-
-
-
Field Detail
-
prismContext
@Autowired protected PrismContext prismContext
-
localizationService
@Autowired protected LocalizationService localizationService
-
-
Method Detail
-
init
public void init(List<org.apache.cxf.jaxrs.model.ClassResourceInfo> cris)
- Overrides:
init
in classorg.apache.cxf.jaxrs.provider.AbstractConfigurableProvider
-
isWriteable
public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
- Specified by:
isWriteable
in interfacejavax.ws.rs.ext.MessageBodyWriter<T>
-
getSize
public long getSize(T t, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
- Specified by:
getSize
in interfacejavax.ws.rs.ext.MessageBodyWriter<T>
-
writeTo
public void writeTo(T object, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders, OutputStream entityStream) throws IOException, javax.ws.rs.WebApplicationException
- Specified by:
writeTo
in interfacejavax.ws.rs.ext.MessageBodyWriter<T>
- Throws:
IOException
javax.ws.rs.WebApplicationException
-
getSerializer
protected abstract PrismSerializer<String> getSerializer()
-
getParser
protected abstract PrismParser getParser(InputStream entityStream)
-
isReadable
public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
- Specified by:
isReadable
in interfacejavax.ws.rs.ext.MessageBodyReader<T>
-
readFrom
public T readFrom(Class<T> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,String> httpHeaders, InputStream entityStream) throws IOException, javax.ws.rs.WebApplicationException
- Specified by:
readFrom
in interfacejavax.ws.rs.ext.MessageBodyReader<T>
- Throws:
IOException
javax.ws.rs.WebApplicationException
-
-