Record Class Permission.Grant
java.lang.Object
java.lang.Record
zeroecho.pki.server.Permission.Grant
- Record Components:
grantId- stable grant identityprincipalId- grantee identityeffect- allow or denyaction- exact actionresourceType- exact resource typescope- exact non-wildcard realm and optional subscopesrelationship- own or anydataView- maximum exact viewconditions- closed conditionsexpiresAt- optional mandatory upper bound for temporary grantsenabled- whether the grant participates in decisions
- Enclosing class:
Permission
public static record Permission.Grant(String grantId, String principalId, Permission.Effect effect, Permission.Action action, Permission.ResourceType resourceType, Permission.Scope scope, Permission.Relationship relationship, Permission.DataView dataView, Set<Permission.Condition> conditions, Optional<Instant> expiresAt, boolean enabled)
extends Record
Immutable persisted permission grant.
-
Constructor Summary
ConstructorsConstructorDescriptionGrant(String grantId, String principalId, Permission.Effect effect, Permission.Action action, Permission.ResourceType resourceType, Permission.Scope scope, Permission.Relationship relationship, Permission.DataView dataView, Set<Permission.Condition> conditions, Optional<Instant> expiresAt, boolean enabled) Validates and snapshots the finite grant. -
Method Summary
Modifier and TypeMethodDescriptionaction()Returns the value of theactionrecord component.Returns the value of theconditionsrecord component.dataView()Returns the value of thedataViewrecord component.effect()Returns the value of theeffectrecord component.booleanenabled()Returns the value of theenabledrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theexpiresAtrecord component.grantId()Returns the value of thegrantIdrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theprincipalIdrecord component.Returns the value of therelationshiprecord component.Returns the value of theresourceTyperecord component.scope()Returns the value of thescoperecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Grant
public Grant(String grantId, String principalId, Permission.Effect effect, Permission.Action action, Permission.ResourceType resourceType, Permission.Scope scope, Permission.Relationship relationship, Permission.DataView dataView, Set<Permission.Condition> conditions, Optional<Instant> expiresAt, boolean enabled) Validates and snapshots the finite grant.
-
-
Method Details
-
toString
-
hashCode
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
grantId
-
principalId
Returns the value of theprincipalIdrecord component.- Returns:
- the value of the
principalIdrecord component
-
effect
-
action
-
resourceType
Returns the value of theresourceTyperecord component.- Returns:
- the value of the
resourceTyperecord component
-
scope
-
relationship
Returns the value of therelationshiprecord component.- Returns:
- the value of the
relationshiprecord component
-
dataView
-
conditions
Returns the value of theconditionsrecord component.- Returns:
- the value of the
conditionsrecord component
-
expiresAt
-
enabled
-