Class EventVoter<T>
java.lang.Object
org.springframework.statemachine.security.EventVoter<T>
- Type Parameters:
T
- the message type
- All Implemented Interfaces:
org.springframework.security.access.AccessDecisionVoter<org.springframework.messaging.Message<T>>
public class EventVoter<T>
extends Object
implements org.springframework.security.access.AccessDecisionVoter<org.springframework.messaging.Message<T>>
Votes if any
ConfigAttribute.getAttribute()
starts with a prefix indicating
that it is an event. The default prefix is EVENT
, but
it 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.
- Author:
- Janne Valkealahti
-
Field Summary
Fields inherited from interface org.springframework.security.access.AccessDecisionVoter
ACCESS_ABSTAIN, ACCESS_DENIED, ACCESS_GRANTED
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGets the event prefix.boolean
boolean
supports
(org.springframework.security.access.ConfigAttribute attribute) int
vote
(org.springframework.security.core.Authentication authentication, org.springframework.messaging.Message<T> event, Collection<org.springframework.security.access.ConfigAttribute> attributes)
-
Constructor Details
-
EventVoter
public EventVoter()
-
-
Method Details
-
supports
public boolean supports(org.springframework.security.access.ConfigAttribute attribute) - Specified by:
supports
in interfaceorg.springframework.security.access.AccessDecisionVoter<T>
-
supports
- Specified by:
supports
in interfaceorg.springframework.security.access.AccessDecisionVoter<T>
-
vote
public int vote(org.springframework.security.core.Authentication authentication, org.springframework.messaging.Message<T> event, Collection<org.springframework.security.access.ConfigAttribute> attributes) - Specified by:
vote
in interfaceorg.springframework.security.access.AccessDecisionVoter<T>
-
getEventPrefix
Gets the event prefix.- Returns:
- the event prefix
-