org.glassfish.jersey.server.validation
Class ValidationError

java.lang.Object
  extended by org.glassfish.jersey.server.validation.ValidationError

public final class ValidationError
extends java.lang.Object

Default validation error entity to be included in Response.

Author:
Michal Gajdos (michal.gajdos at oracle.com)

Constructor Summary
ValidationError()
           
ValidationError(java.lang.String message, java.lang.String messageTemplate, java.lang.String path, java.lang.String invalidValue)
           
 
Method Summary
 java.lang.String getInvalidValue()
          Returns the string representation of the value failing to pass the constraint.
 java.lang.String getMessage()
          Return the interpolated error message for this validation error.
 java.lang.String getMessageTemplate()
          Return the non-interpolated error message for this validation error.
 java.lang.String getPath()
          Return the string representation of the property path to the value.
 void setInvalidValue(java.lang.String invalidValue)
          Set the value failing to pass the constraint.
 void setMessage(java.lang.String message)
          Return the interpolated error message for this validation error.
 void setMessageTemplate(java.lang.String messageTemplate)
          Set the non-interpolated error message for this validation error.
 void setPath(java.lang.String path)
          Set the string representation of the property path to the value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValidationError

public ValidationError()

ValidationError

public ValidationError(java.lang.String message,
                       java.lang.String messageTemplate,
                       java.lang.String path,
                       java.lang.String invalidValue)
Method Detail

getMessage

public java.lang.String getMessage()
Return the interpolated error message for this validation error.

Returns:
the interpolated error message for this validation error.

setMessage

public void setMessage(java.lang.String message)
Return the interpolated error message for this validation error.

Parameters:
message - the interpolated error message for this validation error.

getPath

public java.lang.String getPath()
Return the string representation of the property path to the value.

Returns:
the string representation of the property path to the value.

setPath

public void setPath(java.lang.String path)
Set the string representation of the property path to the value.

Parameters:
path - the string representation of the property path to the value.

getInvalidValue

public java.lang.String getInvalidValue()
Returns the string representation of the value failing to pass the constraint.

Returns:
the value failing to pass the constraint.

setInvalidValue

public void setInvalidValue(java.lang.String invalidValue)
Set the value failing to pass the constraint.

Parameters:
invalidValue - the value failing to pass the constraint.

getMessageTemplate

public java.lang.String getMessageTemplate()
Return the non-interpolated error message for this validation error.

Returns:
the non-interpolated error message for this validation error.

setMessageTemplate

public void setMessageTemplate(java.lang.String messageTemplate)
Set the non-interpolated error message for this validation error.

Parameters:
messageTemplate - the non-interpolated error message for this validation error.


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