Package org.jboss.resteasy.api.validation

## Class ResteasyViolationException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - java.lang.RuntimeException
      - - javax.validation.ValidationException
        - - javax.validation.ConstraintViolationException
          - - org.jboss.resteasy.api.validation.ResteasyViolationException

- All Implemented Interfaces:
    `Serializable`
  Direct Known Subclasses:
    `ResteasyViolationExceptionImpl`

      public abstract class ResteasyViolationException
      extends javax.validation.ConstraintViolationException

  Version:
    $Revision: 1.1 $ Copyright Mar 6, 2012 @TODO Need to work on representation of exceptions @TODO Add javadoc.
  Author:
    Ron Sigal
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static String` | `SUPPRESS_VIOLATION_PATH` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ResteasyViolationException​(String stringRep)` |
    `ResteasyViolationException​(Set<? extends javax.validation.ConstraintViolation<?>> constraintViolations)` | New constructor
    `ResteasyViolationException​(Set<? extends javax.validation.ConstraintViolation<?>> constraintViolations, List<javax.ws.rs.core.MediaType> accept)` | New constructor
    `ResteasyViolationException​(SimpleViolationsContainer container)` | New constructor
    `ResteasyViolationException​(SimpleViolationsContainer container, List<javax.ws.rs.core.MediaType> accept)` | New constructor

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected void` | `checkSuppressPath()` |
    `protected static String` | `convertArrayToString​(Object o)` |
    `protected void` | `convertFromString​(String stringRep)` |
    `protected ResteasyConstraintViolation` | `convertViolation​(javax.validation.ConstraintViolation<?> violation)` |
    `protected void` | `convertViolations()` |
    `List<javax.ws.rs.core.MediaType>` | `getAccept()` |
    `List<ResteasyConstraintViolation>` | `getClassViolations()` |
    `abstract ConstraintTypeUtil` | `getConstraintTypeUtil()` |
    `Exception` | `getException()` |
    `protected int` | `getField​(int start, String line)` |
    `List<ResteasyConstraintViolation>` | `getParameterViolations()` |
    `List<ResteasyConstraintViolation>` | `getPropertyViolations()` |
    `protected abstract ResteasyConfiguration` | `getResteasyConfiguration()` |
    `List<ResteasyConstraintViolation>` | `getReturnValueViolations()` |
    `List<List<ResteasyConstraintViolation>>` | `getViolationLists()` |
    `List<ResteasyConstraintViolation>` | `getViolations()` |
    `void` | `setAccept​(List<javax.ws.rs.core.MediaType> accept)` |
    `void` | `setException​(Exception exception)` |
    `int` | `size()` |
    `protected static List<org.jboss.resteasy.api.validation.ResteasyViolationException.CloneableMediaType>` | `toCloneableMediaTypeList​(List<javax.ws.rs.core.MediaType> list)` |
    `protected static List<javax.ws.rs.core.MediaType>` | `toMediaTypeList​(List<org.jboss.resteasy.api.validation.ResteasyViolationException.CloneableMediaType> cloneableList)` |
    `String` | `toString()` |

    - ### Methods inherited from class javax.validation.ConstraintViolationException

      `getConstraintViolations`

    - ### Methods inherited from class java.lang.Throwable

      `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### SUPPRESS_VIOLATION_PATH

          public static final String SUPPRESS_VIOLATION_PATH

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### ResteasyViolationException

          public ResteasyViolationException​(Set<? extends javax.validation.ConstraintViolation<?>> constraintViolations)

      New constructor
      Parameters:
        `constraintViolations` - set of constraint violations

    - #### ResteasyViolationException

          public ResteasyViolationException​(Set<? extends javax.validation.ConstraintViolation<?>> constraintViolations,
                                            List<javax.ws.rs.core.MediaType> accept)

      New constructor
      Parameters:
        `constraintViolations` - set of constraint violations
        `accept` - list of accept media types

    - #### ResteasyViolationException

          public ResteasyViolationException​(SimpleViolationsContainer container)

      New constructor
      Parameters:
        `container` - violation container

    - #### ResteasyViolationException

          public ResteasyViolationException​(SimpleViolationsContainer container,
                                            List<javax.ws.rs.core.MediaType> accept)

      New constructor
      Parameters:
        `container` - violation container
        `accept` - list of accept media types

    - #### ResteasyViolationException

          public ResteasyViolationException​(String stringRep)

  - ### Method Detail

    - #### getConstraintTypeUtil

          public abstract ConstraintTypeUtil getConstraintTypeUtil()

    - #### getAccept

          public List<javax.ws.rs.core.MediaType> getAccept()

    - #### setAccept

          public void setAccept​(List<javax.ws.rs.core.MediaType> accept)

    - #### getException

          public Exception getException()

    - #### setException

          public void setException​(Exception exception)

    - #### getViolations

          public List<ResteasyConstraintViolation> getViolations()

    - #### getPropertyViolations

          public List<ResteasyConstraintViolation> getPropertyViolations()

    - #### getClassViolations

          public List<ResteasyConstraintViolation> getClassViolations()

    - #### getParameterViolations

          public List<ResteasyConstraintViolation> getParameterViolations()

    - #### getReturnValueViolations

          public List<ResteasyConstraintViolation> getReturnValueViolations()

    - #### size

          public int size()

    - #### getViolationLists

          public List<List<ResteasyConstraintViolation>> getViolationLists()

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Throwable`

    - #### convertFromString

          protected void convertFromString​(String stringRep)

    - #### getField

          protected int getField​(int start,
                                 String line)

    - #### getResteasyConfiguration

          protected abstract ResteasyConfiguration getResteasyConfiguration()

    - #### checkSuppressPath

          protected void checkSuppressPath()

    - #### convertViolations

          protected void convertViolations()

    - #### convertViolation

          protected ResteasyConstraintViolation convertViolation​(javax.validation.ConstraintViolation<?> violation)

    - #### convertArrayToString

          protected static String convertArrayToString​(Object o)

    - #### toCloneableMediaTypeList

          protected static List<org.jboss.resteasy.api.validation.ResteasyViolationException.CloneableMediaType> toCloneableMediaTypeList​(List<javax.ws.rs.core.MediaType> list)

    - #### toMediaTypeList

          protected static List<javax.ws.rs.core.MediaType> toMediaTypeList​(List<org.jboss.resteasy.api.validation.ResteasyViolationException.CloneableMediaType> cloneableList)