Module org.elasticsearch.xcore
Class RoleRetrievalResult
java.lang.Object
org.elasticsearch.xpack.core.security.authz.store.RoleRetrievalResult
The result of attempting to retrieve roles from a roles provider. The result can either be
successful or a failure. A successful result indicates that no errors occurred while retrieving
roles, even if none of the requested roles could be found. A failure indicates an error
occurred while retrieving the results but the error is not fatal and the request may be able
to continue.
-
Method Summary
Modifier and TypeMethodDescriptionstatic RoleRetrievalResultCreates a failed result with the provided non-null exceptionbooleanstatic RoleRetrievalResultsuccess(Set<RoleDescriptor> descriptors) Creates a successful result with the providedRoleDescriptorset, which must be non-null
-
Method Details
-
getDescriptors
- Returns:
- the resolved descriptors or
nullif there was a failure
-
getFailure
- Returns:
- the failure or
nullif retrieval succeeded
-
isSuccess
public boolean isSuccess()- Returns:
- true if the retrieval succeeded
-
success
Creates a successful result with the providedRoleDescriptorset, which must be non-null -
failure
Creates a failed result with the provided non-null exception
-