Record Class AccessContext
java.lang.Object
java.lang.Record
com.svenruppert.jsentinel.authorization.navigation.AccessContext
- Record Components:
subject- authenticated subject, if availableresourceType- adapter-neutral resource typeresourceName- adapter-neutral resource nameoperation- requested operationattributes- adapter-provided contextual attributes
-
Constructor Summary
ConstructorsConstructorDescriptionCompatibility constructor for existing Vaadin navigation code.AccessContext(Optional<JSentinelSubject> subject, String resourceType, String resourceName, String operation, Map<String, Object> attributes) Creates an access context with defensive copies. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theattributesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theoperationrecord component.path()Compatibility accessor for the former path component.Returns the value of theresourceNamerecord component.Returns the value of theresourceTyperecord component.subject()Returns the value of thesubjectrecord component.Class<?> target()Compatibility accessor for the former target component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AccessContext
public AccessContext(Optional<JSentinelSubject> subject, String resourceType, String resourceName, String operation, Map<String, Object> attributes) Creates an access context with defensive copies.- Parameters:
subject- authenticated subject, if availableresourceType- adapter-neutral resource typeresourceName- adapter-neutral resource nameoperation- requested operationattributes- adapter-provided contextual attributes
-
AccessContext
-
-
Method Details
-
path
Compatibility accessor for the former path component.- Returns:
- requested path, if known
-
target
Compatibility accessor for the former target component.- Returns:
- target class, if known
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
subject
-
resourceType
Returns the value of theresourceTyperecord component.- Returns:
- the value of the
resourceTyperecord component
-
resourceName
Returns the value of theresourceNamerecord component.- Returns:
- the value of the
resourceNamerecord component
-
operation
-
attributes
Returns the value of theattributesrecord component.- Returns:
- the value of the
attributesrecord component
-