Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.acegisecurity.intercept.method
Class MethodInvocationPrivilegeEvaluator  view MethodInvocationPrivilegeEvaluator download MethodInvocationPrivilegeEvaluator.java

java.lang.Object
  extended byorg.acegisecurity.intercept.method.MethodInvocationPrivilegeEvaluator
All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean

public class MethodInvocationPrivilegeEvaluator
extends java.lang.Object
implements org.springframework.beans.factory.InitializingBean

Allows users to determine whether they have "before invocation" privileges for a given method invocation.

Of course, if an org.acegisecurity.AfterInvocationManager is used to authorize the result of a method invocation, this class cannot assist determine whether or not the AfterInvocationManager will enable access. Instead this class aims to allow applications to determine whether or not the current principal would be allowed to at least attempt to invoke the method, irrespective of the "after" invocation handling.

Version:
$Id: MethodInvocationPrivilegeEvaluator.java,v 1.2 2005/11/25 04:56:01 benalex Exp $

Field Summary
private  org.acegisecurity.intercept.AbstractSecurityInterceptor securityInterceptor
           
 
Constructor Summary
MethodInvocationPrivilegeEvaluator()
           
 
Method Summary
 void afterPropertiesSet()
          Invoked by a BeanFactory after it has set all bean properties supplied (and satisfied BeanFactoryAware and ApplicationContextAware).
 boolean isAllowed(MethodInvocation mi, org.acegisecurity.Authentication authentication)
           
 void setSecurityInterceptor(org.acegisecurity.intercept.AbstractSecurityInterceptor securityInterceptor)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

securityInterceptor

private org.acegisecurity.intercept.AbstractSecurityInterceptor securityInterceptor
Constructor Detail

MethodInvocationPrivilegeEvaluator

public MethodInvocationPrivilegeEvaluator()
Method Detail

isAllowed

public boolean isAllowed(MethodInvocation mi,
                         org.acegisecurity.Authentication authentication)

setSecurityInterceptor

public void setSecurityInterceptor(org.acegisecurity.intercept.AbstractSecurityInterceptor securityInterceptor)

afterPropertiesSet

public void afterPropertiesSet()
                        throws java.lang.Exception
Description copied from interface: org.springframework.beans.factory.InitializingBean
Invoked by a BeanFactory after it has set all bean properties supplied (and satisfied BeanFactoryAware and ApplicationContextAware).

This method allows the bean instance to perform initialization only possible when all bean properties have been set and to throw an exception in the event of misconfiguration.

Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean