Package com.evolveum.midpoint.rest.impl
Class MidpointAbstractHttpMessageConverter<T>
- java.lang.Object
-
- org.springframework.http.converter.AbstractHttpMessageConverter<T>
-
- com.evolveum.midpoint.rest.impl.MidpointAbstractHttpMessageConverter<T>
-
- All Implemented Interfaces:
org.springframework.http.converter.HttpMessageConverter<T>
- Direct Known Subclasses:
MidpointJsonHttpMessageConverter
,MidpointXmlHttpMessageConverter
,MidpointYamlHttpMessageConverter
public abstract class MidpointAbstractHttpMessageConverter<T> extends org.springframework.http.converter.AbstractHttpMessageConverter<T>
-
-
Field Summary
Fields Modifier and Type Field Description protected PrismContext
prismContext
-
Constructor Summary
Constructors Modifier Constructor Description protected
MidpointAbstractHttpMessageConverter(PrismContext prismContext, LocalizationService localizationService, org.springframework.http.MediaType... supportedMediaTypes)
-
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()
protected T
readInternal(@NotNull Class<? extends T> clazz, @NotNull org.springframework.http.HttpInputMessage inputMessage)
protected boolean
supports(Class<?> clazz)
protected void
writeInternal(T object, @NotNull org.springframework.http.HttpOutputMessage outputMessage)
-
Methods inherited from class org.springframework.http.converter.AbstractHttpMessageConverter
addDefaultHeaders, canRead, canRead, canWrite, canWrite, getContentLength, getDefaultCharset, getDefaultContentType, getSupportedMediaTypes, read, setDefaultCharset, setSupportedMediaTypes, write
-
-
-
-
Field Detail
-
prismContext
protected final PrismContext prismContext
-
-
Constructor Detail
-
MidpointAbstractHttpMessageConverter
protected MidpointAbstractHttpMessageConverter(PrismContext prismContext, LocalizationService localizationService, org.springframework.http.MediaType... supportedMediaTypes)
-
-
Method Detail
-
getSerializer
protected abstract PrismSerializer<String> getSerializer()
-
getParser
protected abstract PrismParser getParser(InputStream entityStream)
-
supports
protected boolean supports(Class<?> clazz)
- Specified by:
supports
in classorg.springframework.http.converter.AbstractHttpMessageConverter<T>
-
readInternal
@NotNull protected T readInternal(@NotNull @NotNull Class<? extends T> clazz, @NotNull @NotNull org.springframework.http.HttpInputMessage inputMessage) throws IOException, org.springframework.http.converter.HttpMessageNotReadableException
- Specified by:
readInternal
in classorg.springframework.http.converter.AbstractHttpMessageConverter<T>
- Throws:
IOException
org.springframework.http.converter.HttpMessageNotReadableException
-
writeInternal
protected void writeInternal(@NotNull T object, @NotNull @NotNull org.springframework.http.HttpOutputMessage outputMessage) throws IOException, org.springframework.http.converter.HttpMessageNotWritableException
- Specified by:
writeInternal
in classorg.springframework.http.converter.AbstractHttpMessageConverter<T>
- Throws:
IOException
org.springframework.http.converter.HttpMessageNotWritableException
-
-