|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.waffle.action.intercept.SecurityMethodInterceptor
public class SecurityMethodInterceptor
This interceptor ensure that only ActionMethod
annotated methods are invokable as Actions
. Usage of
this will help protect your application against malicious attacks.
Constructor Summary | |
---|---|
SecurityMethodInterceptor()
|
|
SecurityMethodInterceptor(MessageResources messageResources)
|
Method Summary | |
---|---|
boolean |
accept(java.lang.reflect.Method actionMethod)
Will always return true (intercepts ALL action methods) Determines if the implementation should intercept the call to the Action Method. |
java.lang.Object |
intercept(ControllerDefinition controllerDefinition,
java.lang.reflect.Method method,
InterceptorChain chain,
java.lang.Object... arguments)
Ensure that the action method to be invoked is annotated with the ActionMethod annotation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SecurityMethodInterceptor()
public SecurityMethodInterceptor(MessageResources messageResources)
Method Detail |
---|
public boolean accept(java.lang.reflect.Method actionMethod)
accept
in interface MethodInterceptor
actionMethod
- is the action method that is to be invoked (or intercepted)
public java.lang.Object intercept(ControllerDefinition controllerDefinition, java.lang.reflect.Method method, InterceptorChain chain, java.lang.Object... arguments) throws java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException
Ensure that the action method to be invoked is annotated with the ActionMethod
annotation. If no
annotation is present a ActionMethodInvocationException
will be thrown.
This method allows an ActionMethod call to be intercepted. To continue onto the next MethodInterceptor,
or ActionMethod, the implementation should call
InterceptorChain.proceed(ControllerDefinition, Method, Object[])
.
intercept
in interface MethodInterceptor
controllerDefinition
- the controller definition instance which owns the action method being invokedmethod
- the actual action method to be invokedchain
- is the InterceptorChain managing the method interceptorsarguments
- are the argument values to satisfy the action method invocation
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |