org.glassfish.jersey.server.validation.internal
Class ValidationErrorMessageBodyWriter
java.lang.Object
org.glassfish.jersey.server.validation.internal.ValidationErrorMessageBodyWriter
- All Implemented Interfaces:
- MessageBodyWriter<Object>
@Provider
public class ValidationErrorMessageBodyWriter
- extends Object
- implements MessageBodyWriter<Object>
MessageBodyWriter providing support for (collections of) ValidationError
that is able to output instances to text/plain/text/html.
- Author:
- Michal Gajdos (michal.gajdos at oracle.com)
|
Method Summary |
long |
getSize(Object validationErrors,
Class<?> type,
Type genericType,
Annotation[] annotations,
MediaType mediaType)
|
boolean |
isWriteable(Class<?> type,
Type genericType,
Annotation[] annotations,
MediaType mediaType)
|
void |
writeTo(Object entity,
Class<?> type,
Type genericType,
Annotation[] annotations,
MediaType mediaType,
MultivaluedMap<String,Object> httpHeaders,
OutputStream entityStream)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ValidationErrorMessageBodyWriter
public ValidationErrorMessageBodyWriter()
isWriteable
public boolean isWriteable(Class<?> type,
Type genericType,
Annotation[] annotations,
MediaType mediaType)
- Specified by:
isWriteable in interface MessageBodyWriter<Object>
getSize
public long getSize(Object validationErrors,
Class<?> type,
Type genericType,
Annotation[] annotations,
MediaType mediaType)
- Specified by:
getSize in interface MessageBodyWriter<Object>
writeTo
public void writeTo(Object entity,
Class<?> type,
Type genericType,
Annotation[] annotations,
MediaType mediaType,
MultivaluedMap<String,Object> httpHeaders,
OutputStream entityStream)
throws IOException,
WebApplicationException
- Specified by:
writeTo in interface MessageBodyWriter<Object>
- Throws:
IOException
WebApplicationException
Copyright © 2007-2012 Oracle Corporation. All Rights Reserved. Use is subject to license terms.