Class RESTHandlerForbiddenError
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- com.ibm.wsspi.rest.handler.helper.RESTHandlerForbiddenError
-
- All Implemented Interfaces:
java.io.Serializable
public class RESTHandlerForbiddenError extends java.lang.RuntimeExceptionThis error is thrown by theRESTHandlerForbiddenErrorwhen an unauthorized request is encountered by aRESTHandler.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description RESTHandlerForbiddenError(java.util.Set<java.lang.String> requiredRoles)Constructs a newRESTHandlerForbiddenError.RESTHandlerForbiddenError(java.util.Set<java.lang.String> requiredRoles, java.lang.String message)Constructs a newRESTHandlerForbiddenError.RESTHandlerForbiddenError(java.util.Set<java.lang.String> requiredRoles, java.lang.String message, java.lang.Throwable cause)Constructs a newRESTHandlerForbiddenError.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Set<java.lang.String>getRequiredRoles()Get the roles that would be sufficient for perform the operation.intgetStatusCode()The status code to return for this error.
-
-
-
Constructor Detail
-
RESTHandlerForbiddenError
public RESTHandlerForbiddenError(java.util.Set<java.lang.String> requiredRoles, java.lang.String message, java.lang.Throwable cause)Constructs a newRESTHandlerForbiddenError.- Parameters:
requiredRoles- Any roles that would be sufficient to perform the operation.message- the detail message.cause- the cause.
-
RESTHandlerForbiddenError
public RESTHandlerForbiddenError(java.util.Set<java.lang.String> requiredRoles, java.lang.String message)Constructs a newRESTHandlerForbiddenError.- Parameters:
requiredRoles- Any roles that would be sufficient to perform the operation.message- the detail message.
-
RESTHandlerForbiddenError
public RESTHandlerForbiddenError(java.util.Set<java.lang.String> requiredRoles)
Constructs a newRESTHandlerForbiddenError.- Parameters:
requiredRoles- Any roles that would be sufficient to perform the operation.
-
-
Method Detail
-
getStatusCode
public int getStatusCode()
The status code to return for this error. This is always 403.- Returns:
- 403.
-
getRequiredRoles
public java.util.Set<java.lang.String> getRequiredRoles()
Get the roles that would be sufficient for perform the operation.- Returns:
- The required roles to perform the operation.
-
-