public class DownloadAuthorization extends Object
Modifier and Type | Class and Description |
---|---|
private static class |
DownloadAuthorization.Result |
Modifier and Type | Field and Description |
---|---|
private static DownloadAuthorization |
APPROVED |
private String |
explanation |
private DownloadAuthorization.Result |
result |
Modifier | Constructor and Description |
---|---|
private |
DownloadAuthorization(DownloadAuthorization.Result result,
String explanation)
Creates a new DownloadAuthorization with the specified result and
explanation.
|
Modifier and Type | Method and Description |
---|---|
static DownloadAuthorization |
approved() |
static DownloadAuthorization |
denied(String explanation)
Creates a new denied DownloadAuthorization with the specified
explanation.
|
String |
getExplanation() |
boolean |
isApproved() |
private static final DownloadAuthorization APPROVED
private final DownloadAuthorization.Result result
private final String explanation
private DownloadAuthorization(DownloadAuthorization.Result result, String explanation)
result
- of the authorizationexplanation
- for the authorization attemptpublic boolean isApproved()
public String getExplanation()
public static DownloadAuthorization approved()
public static DownloadAuthorization denied(String explanation)
explanation
- for why it was deniedIllegalArgumentException
- if explanation is nullCopyright © 2015 Apache NiFi Project. All rights reserved.