Package org.ametys.core.right
Record Class RightManager.ContextPermissions
java.lang.Object
java.lang.Record
org.ametys.core.right.RightManager.ContextPermissions
- Record Components:
permissionsForAnonymous
- the permissions for anonymous userpermissionsForAnyConnected
- the permissions for any connected userpermissionsByUser
- the permissions for specific users by user identitypermissionsByGroup
- the permissions for specific groups by group identity
- Enclosing class:
RightManager
public static record RightManager.ContextPermissions(Map<AccessController.Permission,List<AccessExplanation>> permissionsForAnonymous, Map<AccessController.Permission,List<AccessExplanation>> permissionsForAnyConnected, Map<UserIdentity,Map<AccessController.Permission,List<AccessExplanation>>> permissionsByUser, Map<GroupIdentity,Map<AccessController.Permission,List<AccessExplanation>>> permissionsByGroup)
extends Record
Record to describe all the permissions granted on a context
-
Constructor Summary
ConstructorsConstructorDescriptionContextPermissions
(Map<AccessController.Permission, List<AccessExplanation>> permissionsForAnonymous, Map<AccessController.Permission, List<AccessExplanation>> permissionsForAnyConnected, Map<UserIdentity, Map<AccessController.Permission, List<AccessExplanation>>> permissionsByUser, Map<GroupIdentity, Map<AccessController.Permission, List<AccessExplanation>>> permissionsByGroup) Creates an instance of aContextPermissions
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of thepermissionsByGroup
record component.Returns the value of thepermissionsByUser
record component.Returns the value of thepermissionsForAnonymous
record component.Returns the value of thepermissionsForAnyConnected
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
ContextPermissions
public ContextPermissions(Map<AccessController.Permission, List<AccessExplanation>> permissionsForAnonymous, Map<AccessController.Permission, List<AccessExplanation>> permissionsForAnyConnected, Map<UserIdentity, Map<AccessController.Permission, List<AccessExplanation>>> permissionsByUser, Map<GroupIdentity, Map<AccessController.Permission, List<AccessExplanation>>> permissionsByGroup) Creates an instance of aContextPermissions
record class.- Parameters:
permissionsForAnonymous
- the value for thepermissionsForAnonymous
record componentpermissionsForAnyConnected
- the value for thepermissionsForAnyConnected
record componentpermissionsByUser
- the value for thepermissionsByUser
record componentpermissionsByGroup
- the value for thepermissionsByGroup
record component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
permissionsForAnonymous
Returns the value of thepermissionsForAnonymous
record component.- Returns:
- the value of the
permissionsForAnonymous
record component
-
permissionsForAnyConnected
Returns the value of thepermissionsForAnyConnected
record component.- Returns:
- the value of the
permissionsForAnyConnected
record component
-
permissionsByUser
public Map<UserIdentity,Map<AccessController.Permission, permissionsByUser()List<AccessExplanation>>> Returns the value of thepermissionsByUser
record component.- Returns:
- the value of the
permissionsByUser
record component
-
permissionsByGroup
public Map<GroupIdentity,Map<AccessController.Permission, permissionsByGroup()List<AccessExplanation>>> Returns the value of thepermissionsByGroup
record component.- Returns:
- the value of the
permissionsByGroup
record component
-