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
This error is thrown by the
RESTHandlerForbiddenError
when an unauthorized request is encountered by a RESTHandler
.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionRESTHandlerForbiddenError
(Set<String> requiredRoles) Constructs a newRESTHandlerForbiddenError
.RESTHandlerForbiddenError
(Set<String> requiredRoles, String message) Constructs a newRESTHandlerForbiddenError
.RESTHandlerForbiddenError
(Set<String> requiredRoles, String message, Throwable cause) Constructs a newRESTHandlerForbiddenError
. -
Method Summary
Modifier and TypeMethodDescriptionGet the roles that would be sufficient for perform the operation.int
The status code to return for this error.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
RESTHandlerForbiddenError
Constructs a newRESTHandlerForbiddenError
.- Parameters:
requiredRoles
- Any roles that would be sufficient to perform the operation.message
- the detail message.cause
- the cause.
-
RESTHandlerForbiddenError
Constructs a newRESTHandlerForbiddenError
.- Parameters:
requiredRoles
- Any roles that would be sufficient to perform the operation.message
- the detail message.
-
RESTHandlerForbiddenError
Constructs a newRESTHandlerForbiddenError
.- 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
Get the roles that would be sufficient for perform the operation.- Returns:
- The required roles to perform the operation.
-