S
- the type of stateE
- the type of eventpublic class StateMachineSecurityInterceptor<S,E> extends StateMachineInterceptorAdapter<S,E>
StateMachineInterceptor
which can be registered into a StateMachine
order to intercept a various security related checks.Constructor and Description |
---|
StateMachineSecurityInterceptor()
Instantiates a new state machine security interceptor.
|
StateMachineSecurityInterceptor(org.springframework.security.access.AccessDecisionManager transitionAccessDecisionManager,
org.springframework.security.access.AccessDecisionManager eventAccessDecisionManager)
Instantiates a new state machine security interceptor with
a custom
AccessDecisionManager for both transitions
and events. |
StateMachineSecurityInterceptor(org.springframework.security.access.AccessDecisionManager transitionAccessDecisionManager,
org.springframework.security.access.AccessDecisionManager eventAccessDecisionManager,
SecurityRule eventSecurityRule)
Instantiates a new state machine security interceptor with
a custom
AccessDecisionManager for both transitions
and events and a SecurityRule for events; |
Modifier and Type | Method and Description |
---|---|
org.springframework.messaging.Message<E> |
preEvent(org.springframework.messaging.Message<E> message,
StateMachine<S,E> stateMachine)
Called before message is sent to processing.
|
StateContext<S,E> |
preTransition(StateContext<S,E> stateContext)
Called prior of a start of a transition.
|
void |
setEventAccessDecisionManager(org.springframework.security.access.AccessDecisionManager eventAccessDecisionManager)
Sets the event access decision manager.
|
void |
setEventSecurityRule(SecurityRule eventSecurityRule)
Sets the event security rule.
|
void |
setTransitionAccessDecisionManager(org.springframework.security.access.AccessDecisionManager transitionAccessDecisionManager)
Sets the transition access decision manager.
|
java.lang.String |
toString() |
postStateChange, postTransition, preStateChange, stateMachineError
public StateMachineSecurityInterceptor()
public StateMachineSecurityInterceptor(org.springframework.security.access.AccessDecisionManager transitionAccessDecisionManager, org.springframework.security.access.AccessDecisionManager eventAccessDecisionManager)
AccessDecisionManager
for both transitions
and events.transitionAccessDecisionManager
- the transition access decision managereventAccessDecisionManager
- the event access decision managerpublic StateMachineSecurityInterceptor(org.springframework.security.access.AccessDecisionManager transitionAccessDecisionManager, org.springframework.security.access.AccessDecisionManager eventAccessDecisionManager, SecurityRule eventSecurityRule)
AccessDecisionManager
for both transitions
and events and a SecurityRule
for events;transitionAccessDecisionManager
- the transition access decision managereventAccessDecisionManager
- the event access decision managereventSecurityRule
- the event security rulepublic org.springframework.messaging.Message<E> preEvent(org.springframework.messaging.Message<E> message, StateMachine<S,E> stateMachine)
StateMachineInterceptor
preEvent
in interface StateMachineInterceptor<S,E>
preEvent
in class StateMachineInterceptorAdapter<S,E>
message
- the messagestateMachine
- the state machinepublic StateContext<S,E> preTransition(StateContext<S,E> stateContext)
StateMachineInterceptor
null
from this method will break the transtion
chain.preTransition
in interface StateMachineInterceptor<S,E>
preTransition
in class StateMachineInterceptorAdapter<S,E>
stateContext
- the state contextpublic void setEventAccessDecisionManager(org.springframework.security.access.AccessDecisionManager eventAccessDecisionManager)
eventAccessDecisionManager
- the new event access decision managerpublic void setTransitionAccessDecisionManager(org.springframework.security.access.AccessDecisionManager transitionAccessDecisionManager)
transitionAccessDecisionManager
- the new transition access decision managerpublic void setEventSecurityRule(SecurityRule eventSecurityRule)
eventSecurityRule
- the new event security rulepublic java.lang.String toString()
toString
in class java.lang.Object