public class AccessDeniedException extends RequestExecutionException
| Modifier and Type | Field and Description |
|---|---|
protected Set<Authorization> |
missingAuthorizations
The missing authorization values.
|
protected Principal |
principal
The principal reference.
|
| Constructor and Description |
|---|
AccessDeniedException() |
AccessDeniedException(Principal principal,
Set<Authorization> missingAuthorizations)
Constructor.
|
AccessDeniedException(String message)
Constructor.
|
AccessDeniedException(String message,
Throwable cause)
Constructor.
|
AccessDeniedException(Throwable cause)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
ResponseWithErrorCode |
getErrorResponse() |
Set<Authorization> |
getMissingAuthorizations()
The missing authorization values.
|
Principal |
getPrincipal()
The principal reference.
|
static AccessDeniedException |
raiseMissingAuthorizations(Principal principal,
Iterable<? extends Authorization> missingAuthorizations)
Static factory method to instantiate a new exception.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString@Nullable protected transient Set<Authorization> missingAuthorizations
public AccessDeniedException(@Nullable String message)
message - The message.public AccessDeniedException(@Nullable Throwable cause)
cause - The error cause.public AccessDeniedException(@Nullable String message, @Nullable Throwable cause)
message - The message.cause - The error cause.public AccessDeniedException(@Nullable Principal principal, @Nullable Set<Authorization> missingAuthorizations)
principal - The principal reference.missingAuthorizations - The missing authorization values.public AccessDeniedException()
@Nonnull public static AccessDeniedException raiseMissingAuthorizations(@Nullable Principal principal, @Nullable Iterable<? extends Authorization> missingAuthorizations)
principal - The principal reference.missingAuthorizations - The missing authorization values.@Nonnull public ResponseWithErrorCode getErrorResponse()
getErrorResponse in interface WithErrorResponsegetErrorResponse in class RequestExecutionException@Nullable public Set<Authorization> getMissingAuthorizations()
Copyright © 2020 SAP SE. All rights reserved.