Record Class NavigationJSentinelContext
java.lang.Object
java.lang.Record
com.svenruppert.jsentinel.authorization.navigation.NavigationJSentinelContext
- Record Components:
- the class being navigated torestricted- whether the target carries a restriction annotationsubjectAvailable- whether a security subject exists in the current sessionisLoginTarget- whether the target is the login view itself
public record NavigationJSentinelContext(Class<?> navigationTarget, boolean restricted, boolean subjectAvailable, boolean isLoginTarget)
extends Record
Vaadin-free context for making navigation security decisions.
This record captures the relevant facts about a navigation event
without depending on any Vaadin types. The Vaadin listener builds
this context from the BeforeEnterEvent and passes it to
NavigationAccessDecisionService.
-
Constructor Summary
ConstructorsConstructorDescriptionNavigationJSentinelContext(Class<?> navigationTarget, boolean restricted, boolean subjectAvailable, boolean isLoginTarget) Creates an instance of aNavigationJSentinelContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theisLoginTargetrecord component.Class<?> Returns the value of thenavigationTargetrecord component.booleanReturns the value of therestrictedrecord component.booleanReturns the value of thesubjectAvailablerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
NavigationJSentinelContext
public NavigationJSentinelContext(Class<?> navigationTarget, boolean restricted, boolean subjectAvailable, boolean isLoginTarget) Creates an instance of aNavigationJSentinelContextrecord class.- Parameters:
navigationTarget- the value for thenavigationTargetrecord componentrestricted- the value for therestrictedrecord componentsubjectAvailable- the value for thesubjectAvailablerecord componentisLoginTarget- the value for theisLoginTargetrecord component
-
-
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. -
restricted
public boolean restricted()Returns the value of therestrictedrecord component.- Returns:
- the value of the
restrictedrecord component
-
subjectAvailable
public boolean subjectAvailable()Returns the value of thesubjectAvailablerecord component.- Returns:
- the value of the
subjectAvailablerecord component
-
isLoginTarget
public boolean isLoginTarget()Returns the value of theisLoginTargetrecord component.- Returns:
- the value of the
isLoginTargetrecord component
-