Class RESTHandlerForbiddenError

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.ibm.wsspi.rest.handler.helper.RESTHandlerForbiddenError
All Implemented Interfaces:
Serializable

public class RESTHandlerForbiddenError extends RuntimeException
This error is thrown by the RESTHandlerForbiddenError when an unauthorized request is encountered by a RESTHandler.
See Also:
  • Constructor Details

    • RESTHandlerForbiddenError

      public RESTHandlerForbiddenError(Set<String> requiredRoles, String message, Throwable cause)
      Constructs a new RESTHandlerForbiddenError.
      Parameters:
      requiredRoles - Any roles that would be sufficient to perform the operation.
      message - the detail message.
      cause - the cause.
    • RESTHandlerForbiddenError

      public RESTHandlerForbiddenError(Set<String> requiredRoles, String message)
      Constructs a new RESTHandlerForbiddenError.
      Parameters:
      requiredRoles - Any roles that would be sufficient to perform the operation.
      message - the detail message.
    • RESTHandlerForbiddenError

      public RESTHandlerForbiddenError(Set<String> requiredRoles)
      Constructs a new RESTHandlerForbiddenError.
      Parameters:
      requiredRoles - Any roles that would be sufficient to perform the operation.
  • Method Details

    • getStatusCode

      public int getStatusCode()
      The status code to return for this error. This is always 403.
      Returns:
      403.
    • getRequiredRoles

      public Set<String> getRequiredRoles()
      Get the roles that would be sufficient for perform the operation.
      Returns:
      The required roles to perform the operation.