public class AuthorizationResult extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
AuthorizationResult.Result |
| Modifier and Type | Field and Description |
|---|---|
private static AuthorizationResult |
APPROVED |
private String |
explanation |
private static AuthorizationResult |
RESOURCE_NOT_FOUND |
private AuthorizationResult.Result |
result |
| Modifier | Constructor and Description |
|---|---|
private |
AuthorizationResult(AuthorizationResult.Result result,
String explanation)
Creates a new AuthorizationResult with the specified result and explanation.
|
| Modifier and Type | Method and Description |
|---|---|
static AuthorizationResult |
approved() |
static AuthorizationResult |
denied()
Creates a new denied AuthorizationResult with a message indicating 'Access is denied'.
|
static AuthorizationResult |
denied(String explanation)
Creates a new denied AuthorizationResult with the specified explanation.
|
String |
getExplanation() |
AuthorizationResult.Result |
getResult() |
static AuthorizationResult |
resourceNotFound()
Resource not found will indicate that there are no specific authorization rules for this resource.
|
private static final AuthorizationResult APPROVED
private static final AuthorizationResult RESOURCE_NOT_FOUND
private final AuthorizationResult.Result result
private final String explanation
private AuthorizationResult(AuthorizationResult.Result result, String explanation)
result - of the authorizationexplanation - for the authorization attemptpublic AuthorizationResult.Result getResult()
public String getExplanation()
public static AuthorizationResult approved()
public static AuthorizationResult resourceNotFound()
public static AuthorizationResult denied()
public static AuthorizationResult denied(String explanation)
explanation - for why it was deniedIllegalArgumentException - if explanation is nullCopyright © 2016 Apache NiFi Project. All rights reserved.