public final class UserRoleAncestryHydrationResponse extends Object
UserRoleAncestryHydrationService
in response to hydration requests.Constructor and Description |
---|
UserRoleAncestryHydrationResponse(boolean successful,
String errorMessage,
List<UserRole> roleAndAncestors) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
static UserRoleAncestryHydrationResponse |
error(String errorMessage) |
String |
getErrorMessage()
If the operation was not
successful , this will contain an error message describing
why. |
List<UserRole> |
getRoleAndAncestors()
If the operation was
successful , this will contain the role itself along with all of
its ancestors. |
int |
hashCode() |
boolean |
isSuccessful()
Reports whether the hydration of the ancestry was successful.
|
static UserRoleAncestryHydrationResponse |
success(@NonNull List<UserRole> ancestors) |
String |
toString() |
public static UserRoleAncestryHydrationResponse success(@NonNull @NonNull List<UserRole> ancestors)
public static UserRoleAncestryHydrationResponse error(String errorMessage)
public boolean isSuccessful()
@Nullable public String getErrorMessage()
successful
, this will contain an error message describing
why.@Nullable public List<UserRole> getRoleAndAncestors()
successful
, this will contain the role itself along with all of
its ancestors. This will be sorted starting with the role itself, followed by its direct
parent and so on with the last element being the root-level ancestor.Copyright © 2021. All rights reserved.