Package io.camunda.security.reader
Record Class ResourceAccess
java.lang.Object
java.lang.Record
io.camunda.security.reader.ResourceAccess
public record ResourceAccess(boolean allowed, boolean wildcard, Authorization<?> authorization)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionResourceAccess(boolean allowed, boolean wildcard, Authorization<?> authorization) Creates an instance of aResourceAccessrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanallowed()Returns the value of theallowedrecord component.static ResourceAccessallowed(Authorization<?> authorization) Creates aResourceAccessthat allows access to a specific resource.Returns the value of theauthorizationrecord component.booleandenied()Returns true if access to the resource is denied.static ResourceAccessdenied(Authorization<?> authorization) Creates aResourceAccessthat denies access to a specific resource.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.booleanwildcard()Returns the value of thewildcardrecord component.static ResourceAccesswildcard(Authorization<?> authorization) Creates aResourceAccessthat allows wildcard access to any specific resource.
-
Constructor Details
-
ResourceAccess
Creates an instance of aResourceAccessrecord class.- Parameters:
allowed- the value for theallowedrecord componentwildcard- the value for thewildcardrecord componentauthorization- the value for theauthorizationrecord component
-
-
Method Details
-
denied
public boolean denied()Returns true if access to the resource is denied. -
allowed
Creates aResourceAccessthat allows access to a specific resource. The resource and the granted permissions are specified by the passedauthorization. -
denied
Creates aResourceAccessthat denies access to a specific resource. The denied access is specified by the passedauthorization. -
wildcard
Creates aResourceAccessthat allows wildcard access to any specific resource. The passedauthorizationspecifies the permissions that are allowed. -
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
public final int 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
allowed
public boolean allowed()Returns the value of theallowedrecord component.- Returns:
- the value of the
allowedrecord component
-
wildcard
public boolean wildcard()Returns the value of thewildcardrecord component.- Returns:
- the value of the
wildcardrecord component
-
authorization
Returns the value of theauthorizationrecord component.- Returns:
- the value of the
authorizationrecord component
-