|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
javax.ws.rs.WebApplicationException
javax.ws.rs.ValidationException
public class ValidationException
Exception class used by JAX-RS implementations to report constraint validations.
Constructor Summary | |
---|---|
ValidationException()
Construct a new instance with an HTTP status code of 500 and an empty list of violations. |
|
ValidationException(int status)
Construct a new instance with the specified HTTP status code and an empty list of violations. |
|
ValidationException(int status,
java.util.List<java.lang.String> violations)
Construct a new instance with the specified HTTP status code and a list of violations. |
|
ValidationException(Response.Status status)
Construct a new instance with the specified HTTP status code and an empty list of violations. |
|
ValidationException(Response.Status status,
java.util.List<java.lang.String> violations)
Construct a new instance with the specified HTTP status code and a list of violations. |
Method Summary | |
---|---|
java.util.List<java.lang.String> |
getViolations()
Get list of constraint validations. |
Methods inherited from class javax.ws.rs.WebApplicationException |
---|
getResponse |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ValidationException()
public ValidationException(int status)
status
- HTTP status codepublic ValidationException(Response.Status status) throws java.lang.IllegalArgumentException
status
- HTTP status code
java.lang.IllegalArgumentException
- if status is null
public ValidationException(int status, java.util.List<java.lang.String> violations) throws java.lang.IllegalArgumentException
status
- HTTP status codeviolations
- list of violations
java.lang.IllegalArgumentException
- if status or violations is null
public ValidationException(Response.Status status, java.util.List<java.lang.String> violations) throws java.lang.IllegalArgumentException
status
- HTTP status codeviolations
- list of violations
java.lang.IllegalArgumentException
- if status or violations is null
Method Detail |
---|
public java.util.List<java.lang.String> getViolations()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |