S
- the type of stateE
- the type of eventpublic class TransitionVoter<S,E> extends java.lang.Object implements org.springframework.security.access.AccessDecisionVoter<Transition<S,E>>
ConfigAttribute.getAttribute()
starts with a prefix indicating
that it is a transition source or target. The default prefixes strings are
TRANSITION_SOURCE
and TRANSITION_TARGET
, but
those may be overridden to any value. It may also be set to empty, which means that
essentially any attribute will be voted on. As described further below, the effect
of an empty prefix may not be quite desirable.
All comparisons and prefixes are case sensitive.
Constructor and Description |
---|
TransitionVoter() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getTransitionSourcePrefix()
Gets the transition source prefix.
|
java.lang.String |
getTransitionTargetPrefix()
Gets the transition target prefix.
|
void |
setTransitionSourcePrefix(java.lang.String transitionSourcePrefix)
Allows the default transition source prefix of
TRANSITION_SOURCE_ to
be overridden. |
void |
setTransitionTargetPrefix(java.lang.String transitionTargetPrefix)
Allows the default transition target prefix of
TRANSITION_TARGET_ to
be overridden. |
boolean |
supports(java.lang.Class<?> clazz) |
boolean |
supports(org.springframework.security.access.ConfigAttribute attribute) |
int |
vote(org.springframework.security.core.Authentication authentication,
Transition<S,E> transition,
java.util.Collection<org.springframework.security.access.ConfigAttribute> attributes) |
public boolean supports(org.springframework.security.access.ConfigAttribute attribute)
supports
in interface org.springframework.security.access.AccessDecisionVoter<Transition<S,E>>
public boolean supports(java.lang.Class<?> clazz)
supports
in interface org.springframework.security.access.AccessDecisionVoter<Transition<S,E>>
public int vote(org.springframework.security.core.Authentication authentication, Transition<S,E> transition, java.util.Collection<org.springframework.security.access.ConfigAttribute> attributes)
vote
in interface org.springframework.security.access.AccessDecisionVoter<Transition<S,E>>
public java.lang.String getTransitionSourcePrefix()
public void setTransitionSourcePrefix(java.lang.String transitionSourcePrefix)
TRANSITION_SOURCE_
to
be overridden. May be set to an empty value, although this is usually not desirable.transitionSourcePrefix
- the new transition source prefixpublic java.lang.String getTransitionTargetPrefix()
public void setTransitionTargetPrefix(java.lang.String transitionTargetPrefix)
TRANSITION_TARGET_
to
be overridden. May be set to an empty value, although this is usually not desirable.transitionTargetPrefix
- the new transition source prefix