Class ErrorEntityMessageBodyWriter
java.lang.Object
com.atlassian.crowd.plugin.rest.exception.mapper.ErrorEntityMessageBodyWriter
- All Implemented Interfaces:
javax.ws.rs.ext.MessageBodyWriter<ErrorEntity>
@Provider
@Produces({"text/plain; charset=utf-8","text/csv"})
public class ErrorEntityMessageBodyWriter
extends Object
implements javax.ws.rs.ext.MessageBodyWriter<ErrorEntity>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionlong
getSize
(ErrorEntity errorEntity, Class<?> aClass, Type type, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType) boolean
isWriteable
(Class<?> aClass, Type type, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType) void
writeTo
(ErrorEntity errorEntity, Class<?> aClass, Type type, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String, Object> multivaluedMap, OutputStream entityStream)
-
Constructor Details
-
ErrorEntityMessageBodyWriter
public ErrorEntityMessageBodyWriter()
-
-
Method Details
-
isWriteable
public boolean isWriteable(Class<?> aClass, Type type, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType) - Specified by:
isWriteable
in interfacejavax.ws.rs.ext.MessageBodyWriter<ErrorEntity>
-
getSize
public long getSize(@Nullable ErrorEntity errorEntity, Class<?> aClass, Type type, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType) - Specified by:
getSize
in interfacejavax.ws.rs.ext.MessageBodyWriter<ErrorEntity>
-
writeTo
public void writeTo(@Nullable ErrorEntity errorEntity, Class<?> aClass, Type type, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String, Object> multivaluedMap, OutputStream entityStream) throws IOException, javax.ws.rs.WebApplicationException- Specified by:
writeTo
in interfacejavax.ws.rs.ext.MessageBodyWriter<ErrorEntity>
- Throws:
IOException
javax.ws.rs.WebApplicationException
-