org.appfuse.service
Class UserSecurityAdvice

java.lang.Object
  extended by org.appfuse.service.UserSecurityAdvice
All Implemented Interfaces:
org.aopalliance.aop.Advice, org.springframework.aop.AfterAdvice, org.springframework.aop.AfterReturningAdvice, org.springframework.aop.BeforeAdvice, org.springframework.aop.MethodBeforeAdvice

public class UserSecurityAdvice
extends java.lang.Object
implements org.springframework.aop.MethodBeforeAdvice, org.springframework.aop.AfterReturningAdvice


Field Summary
static java.lang.String ACCESS_DENIED
           
protected  org.apache.commons.logging.Log log
           
 
Constructor Summary
UserSecurityAdvice()
           
 
Method Summary
 void afterReturning(java.lang.Object returnValue, java.lang.reflect.Method method, java.lang.Object[] args, java.lang.Object target)
           
 void before(java.lang.reflect.Method method, java.lang.Object[] args, java.lang.Object target)
          Method to enforce security and only allow administrators to modify users.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ACCESS_DENIED

public static final java.lang.String ACCESS_DENIED
See Also:
Constant Field Values

log

protected final org.apache.commons.logging.Log log
Constructor Detail

UserSecurityAdvice

public UserSecurityAdvice()
Method Detail

before

public void before(java.lang.reflect.Method method,
                   java.lang.Object[] args,
                   java.lang.Object target)
            throws java.lang.Throwable
Method to enforce security and only allow administrators to modify users. Regular users are allowed to modify themselves.

Specified by:
before in interface org.springframework.aop.MethodBeforeAdvice
Throws:
java.lang.Throwable

afterReturning

public void afterReturning(java.lang.Object returnValue,
                           java.lang.reflect.Method method,
                           java.lang.Object[] args,
                           java.lang.Object target)
                    throws java.lang.Throwable
Specified by:
afterReturning in interface org.springframework.aop.AfterReturningAdvice
Throws:
java.lang.Throwable


Copyright © 2003-2007. All Rights Reserved.