org.glassfish.jersey.server.validation.internal
Class ValidationErrorMessageBodyWriter

java.lang.Object
  extended by org.glassfish.jersey.server.validation.internal.ValidationErrorMessageBodyWriter
All Implemented Interfaces:
MessageBodyWriter<java.lang.Object>

@Provider
public class ValidationErrorMessageBodyWriter
extends java.lang.Object
implements MessageBodyWriter<java.lang.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)

Constructor Summary
ValidationErrorMessageBodyWriter()
           
 
Method Summary
 long getSize(java.lang.Object validationErrors, java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, MediaType mediaType)
           
 boolean isWriteable(java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, MediaType mediaType)
           
 void writeTo(java.lang.Object entity, java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, MediaType mediaType, MultivaluedMap<java.lang.String,java.lang.Object> httpHeaders, java.io.OutputStream entityStream)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValidationErrorMessageBodyWriter

public ValidationErrorMessageBodyWriter()
Method Detail

isWriteable

public boolean isWriteable(java.lang.Class<?> type,
                           java.lang.reflect.Type genericType,
                           java.lang.annotation.Annotation[] annotations,
                           MediaType mediaType)
Specified by:
isWriteable in interface MessageBodyWriter<java.lang.Object>

getSize

public long getSize(java.lang.Object validationErrors,
                    java.lang.Class<?> type,
                    java.lang.reflect.Type genericType,
                    java.lang.annotation.Annotation[] annotations,
                    MediaType mediaType)
Specified by:
getSize in interface MessageBodyWriter<java.lang.Object>

writeTo

public void writeTo(java.lang.Object entity,
                    java.lang.Class<?> type,
                    java.lang.reflect.Type genericType,
                    java.lang.annotation.Annotation[] annotations,
                    MediaType mediaType,
                    MultivaluedMap<java.lang.String,java.lang.Object> httpHeaders,
                    java.io.OutputStream entityStream)
             throws java.io.IOException,
                    WebApplicationException
Specified by:
writeTo in interface MessageBodyWriter<java.lang.Object>
Throws:
java.io.IOException
WebApplicationException


Copyright © 2007-2013 Oracle Corporation. All Rights Reserved. Use is subject to license terms.