Class DefaultPrivilegeService.PrivilegeHydrationResult
java.lang.Object
com.broadleafcommerce.auth.security.service.DefaultPrivilegeService.PrivilegeHydrationResult
- Enclosing class:
- DefaultPrivilegeService
An intermediary data structure used internally by
PrivilegeService to hold all the
restrictions, flat permissions, restricted roles, and restricted permissions of a user entity and permissions from a server entity to prevent
querying the data multiple times.-
Constructor Summary
ConstructorsConstructorDescriptionPrivilegeHydrationResult(User user, Set<UserPermissionRef> flatPermissions, Set<Restriction> restrictions, Set<RestrictedRole> restrictedRoles, Map<String, Collection<UserRole>> restrictedRoleWithAncestorsByRestrictedRoleId, Set<RestrictedPermission> restrictedPermissions) Creates a newPrivilegeHydrationResultinstance.PrivilegeHydrationResult(Set<UserPermissionRef> flatPermissions, Set<Restriction> restrictions, Set<RestrictedRole> restrictedRoles, Map<String, Collection<UserRole>> restrictedRoleWithAncestorsByRestrictedRoleId, Set<RestrictedPermission> restrictedPermissions) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanAll of the flat permissions fromUser.getPermissions(), includingUserRole.getPermissions()inherited fromUser.getRoles()and their ancestors.All of the directly assignedUser.getRestrictedPermissions()from anUser, this does not include anything fromUser.getRoles().All of theUser.getRestrictedRoles().All of the hydratedUser.getRestrictedRoles()along with their ancestors mapped by the restricted role id.All of theUser.getRestrictions().getUser()TheUserthat thisDefaultPrivilegeService.PrivilegeHydrationResultis for.inthashCode()voidsetFlatPermissions(Set<UserPermissionRef> flatPermissions) All of the flat permissions fromUser.getPermissions(), includingUserRole.getPermissions()inherited fromUser.getRoles()and their ancestors.voidsetRestrictedPermissions(Set<RestrictedPermission> restrictedPermissions) All of the directly assignedUser.getRestrictedPermissions()from anUser, this does not include anything fromUser.getRoles().voidsetRestrictedRoles(Set<RestrictedRole> restrictedRoles) All of theUser.getRestrictedRoles().voidsetRestrictedRoleWithAncestorsByRestrictedRoleId(Map<String, Collection<UserRole>> restrictedRoleWithAncestorsByRestrictedRoleId) All of the hydratedUser.getRestrictedRoles()along with their ancestors mapped by the restricted role id.voidsetRestrictions(Set<Restriction> restrictions) All of theUser.getRestrictions().voidTheUserthat thisDefaultPrivilegeService.PrivilegeHydrationResultis for.toString()
-
Constructor Details
-
PrivilegeHydrationResult
@Deprecated(since="Authentication Service 2.3.0, Release Train 2.3.0") public PrivilegeHydrationResult(Set<UserPermissionRef> flatPermissions, Set<Restriction> restrictions, Set<RestrictedRole> restrictedRoles, Map<String, Collection<UserRole>> restrictedRoleWithAncestorsByRestrictedRoleId, Set<RestrictedPermission> restrictedPermissions) Deprecated. -
PrivilegeHydrationResult
public PrivilegeHydrationResult(User user, Set<UserPermissionRef> flatPermissions, Set<Restriction> restrictions, Set<RestrictedRole> restrictedRoles, Map<String, Collection<UserRole>> restrictedRoleWithAncestorsByRestrictedRoleId, Set<RestrictedPermission> restrictedPermissions) Creates a newPrivilegeHydrationResultinstance.- Parameters:
user- TheUserthat thisDefaultPrivilegeService.PrivilegeHydrationResultis for.flatPermissions- All of the flat permissions fromUser.getPermissions(), includingUserRole.getPermissions()inherited fromUser.getRoles()and their ancestors. This also includes all of the flat permissions fromAuthorizationServer.getDefaultUserPermissions()andAuthorizationServer.getDefaultUserRoles()along with their ancestors.restrictions- All of theUser.getRestrictions().restrictedRoles- All of theUser.getRestrictedRoles().restrictedRoleWithAncestorsByRestrictedRoleId- All of the hydratedUser.getRestrictedRoles()along with their ancestors mapped by the restricted role id.restrictedPermissions- All of the directly assignedUser.getRestrictedPermissions()from anUser, this does not include anything fromUser.getRoles().- Since:
- Authentication Service 2.3.0, Release Train 2.3.0
-
-
Method Details
-
getUser
TheUserthat thisDefaultPrivilegeService.PrivilegeHydrationResultis for.- Since:
- Authentication Service 2.3.0, Release Train 2.3.0
-
getFlatPermissions
All of the flat permissions fromUser.getPermissions(), includingUserRole.getPermissions()inherited fromUser.getRoles()and their ancestors. This also includes all of the flat permissions fromAuthorizationServer.getDefaultUserPermissions()andAuthorizationServer.getDefaultUserRoles()along with their ancestors. -
getRestrictions
All of theUser.getRestrictions(). -
getRestrictedRoles
All of theUser.getRestrictedRoles(). -
getRestrictedRoleWithAncestorsByRestrictedRoleId
All of the hydratedUser.getRestrictedRoles()along with their ancestors mapped by the restricted role id. -
getRestrictedPermissions
All of the directly assignedUser.getRestrictedPermissions()from anUser, this does not include anything fromUser.getRoles(). -
setUser
TheUserthat thisDefaultPrivilegeService.PrivilegeHydrationResultis for.- Since:
- Authentication Service 2.3.0, Release Train 2.3.0
-
setFlatPermissions
All of the flat permissions fromUser.getPermissions(), includingUserRole.getPermissions()inherited fromUser.getRoles()and their ancestors. This also includes all of the flat permissions fromAuthorizationServer.getDefaultUserPermissions()andAuthorizationServer.getDefaultUserRoles()along with their ancestors. -
setRestrictions
All of theUser.getRestrictions(). -
setRestrictedRoles
All of theUser.getRestrictedRoles(). -
setRestrictedRoleWithAncestorsByRestrictedRoleId
public void setRestrictedRoleWithAncestorsByRestrictedRoleId(Map<String, Collection<UserRole>> restrictedRoleWithAncestorsByRestrictedRoleId) All of the hydratedUser.getRestrictedRoles()along with their ancestors mapped by the restricted role id. -
setRestrictedPermissions
All of the directly assignedUser.getRestrictedPermissions()from anUser, this does not include anything fromUser.getRoles(). -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-