org.loom.interceptor
Class DefaultSecurityInterceptor

java.lang.Object
  extended by org.loom.interceptor.DefaultSecurityInterceptor
All Implemented Interfaces:
CreateInterceptor, Interceptor, SecurityInterceptor, ButtonDecorator, LinkDecorator

public class DefaultSecurityInterceptor
extends java.lang.Object
implements SecurityInterceptor, LinkDecorator, ButtonDecorator, CreateInterceptor

Checks that the user has the required roles to call the event. This instance should be injected with scope prototype


Constructor Summary
DefaultSecurityInterceptor()
           
 
Method Summary
 Resolution afterCreate(ParsedAction action)
           
 void decorate(Button button)
           
 void decorate(Link link)
          Modify a link pointing here.
 java.lang.String[] getAllowedRoles()
           
 void setAllowedRoles(java.lang.String[] allowedRoles)
           
 void setSecurityAdapter(SecurityAdapter securityAdapter)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultSecurityInterceptor

public DefaultSecurityInterceptor()
Method Detail

decorate

public void decorate(Link link)
Description copied from interface: LinkDecorator
Modify a link pointing here.

Specified by:
decorate in interface LinkDecorator

decorate

public void decorate(Button button)
Specified by:
decorate in interface ButtonDecorator

afterCreate

public Resolution afterCreate(ParsedAction action)
Specified by:
afterCreate in interface CreateInterceptor
Parameters:
action - the action and event that is being executed
Returns:
if return value != null, stops the execution of the workflow and return the provided resolution

getAllowedRoles

public java.lang.String[] getAllowedRoles()

setAllowedRoles

public void setAllowedRoles(java.lang.String[] allowedRoles)
Specified by:
setAllowedRoles in interface SecurityInterceptor

setSecurityAdapter

public void setSecurityAdapter(SecurityAdapter securityAdapter)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object