Class UserRoleAncestryHydrationResponse
- java.lang.Object
-
- com.broadleafcommerce.auth.security.service.hydration.UserRoleAncestryHydrationResponse
-
public final class UserRoleAncestryHydrationResponse extends Object
Returned byUserRoleAncestryHydrationService
in response to hydration requests.- Author:
- Samarth Dhruva (samarthd)
-
-
Constructor Summary
Constructors Constructor Description UserRoleAncestryHydrationResponse(boolean successful, String errorMessage, List<UserRole> roleAndAncestors)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
static UserRoleAncestryHydrationResponse
error(String errorMessage)
String
getErrorMessage()
If the operation was notsuccessful
, this will contain an error message describing why.List<UserRole>
getRoleAndAncestors()
If the operation wassuccessful
, 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()
-
-
-
Method Detail
-
success
public static UserRoleAncestryHydrationResponse success(@NonNull @NonNull List<UserRole> ancestors)
-
error
public static UserRoleAncestryHydrationResponse error(String errorMessage)
-
isSuccessful
public boolean isSuccessful()
Reports whether the hydration of the ancestry was successful.
-
getErrorMessage
@Nullable public String getErrorMessage()
If the operation was notsuccessful
, this will contain an error message describing why.
-
getRoleAndAncestors
@Nullable public List<UserRole> getRoleAndAncestors()
If the operation wassuccessful
, 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.
-
-