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

Quick Search    Search Deep

org.acegisecurity.intercept.method.aspectj
Class AspectJSecurityInterceptor  view AspectJSecurityInterceptor download AspectJSecurityInterceptor.java

java.lang.Object
  extended byorg.acegisecurity.intercept.AbstractSecurityInterceptor
      extended byorg.acegisecurity.intercept.method.aspectj.AspectJSecurityInterceptor
All Implemented Interfaces:
org.springframework.context.ApplicationEventPublisherAware, org.springframework.beans.factory.InitializingBean, org.springframework.context.MessageSourceAware

public class AspectJSecurityInterceptor
extends org.acegisecurity.intercept.AbstractSecurityInterceptor

Provides security interception of AspectJ method invocations.

The ObjectDefinitionSource required by this security interceptor is of type org.acegisecurity.intercept.method.MethodDefinitionSource. This is shared with the AOP Alliance based security interceptor (MethodSecurityInterceptor), since both work with Java Methods.

The secure object type is org.aspectj.lang.JoinPoint, which is passed from the relevant around() advice. The around() advice also passes an anonymous implementation of AspectJCallback which contains the call for AspectJ to continue processing: return proceed();.

Refer to org.acegisecurity.intercept.AbstractSecurityInterceptor for details on the workflow.

Version:
$Id: AspectJSecurityInterceptor.java,v 1.3 2005/11/17 00:56:48 benalex Exp $

Field Summary
private  org.acegisecurity.intercept.method.MethodDefinitionSource objectDefinitionSource
           
 
Fields inherited from class org.acegisecurity.intercept.AbstractSecurityInterceptor
logger, messages
 
Constructor Summary
AspectJSecurityInterceptor()
           
 
Method Summary
 org.acegisecurity.intercept.method.MethodDefinitionSource getObjectDefinitionSource()
           
 java.lang.Class getSecureObjectClass()
          Indicates the type of secure objects the subclass will be presenting to the abstract parent for processing.
 java.lang.Object invoke(JoinPoint jp, AspectJCallback advisorProceed)
          This method should be used to enforce security on a JoinPoint.
 org.acegisecurity.intercept.ObjectDefinitionSource obtainObjectDefinitionSource()
           
 void setObjectDefinitionSource(org.acegisecurity.intercept.method.MethodDefinitionSource newSource)
           
 
Methods inherited from class org.acegisecurity.intercept.AbstractSecurityInterceptor
afterInvocation, afterPropertiesSet, beforeInvocation, getAccessDecisionManager, getAfterInvocationManager, getAuthenticationManager, getRunAsManager, isAlwaysReauthenticate, isRejectPublicInvocations, isValidateConfigAttributes, setAccessDecisionManager, setAfterInvocationManager, setAlwaysReauthenticate, setApplicationEventPublisher, setAuthenticationManager, setMessageSource, setRejectPublicInvocations, setRunAsManager, setValidateConfigAttributes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

objectDefinitionSource

private org.acegisecurity.intercept.method.MethodDefinitionSource objectDefinitionSource
Constructor Detail

AspectJSecurityInterceptor

public AspectJSecurityInterceptor()
Method Detail

setObjectDefinitionSource

public void setObjectDefinitionSource(org.acegisecurity.intercept.method.MethodDefinitionSource newSource)

getObjectDefinitionSource

public org.acegisecurity.intercept.method.MethodDefinitionSource getObjectDefinitionSource()

getSecureObjectClass

public java.lang.Class getSecureObjectClass()
Description copied from class: org.acegisecurity.intercept.AbstractSecurityInterceptor
Indicates the type of secure objects the subclass will be presenting to the abstract parent for processing. This is used to ensure collaborators wired to the AbstractSecurityInterceptor all support the indicated secure object class.


invoke

public java.lang.Object invoke(JoinPoint jp,
                               AspectJCallback advisorProceed)
This method should be used to enforce security on a JoinPoint.


obtainObjectDefinitionSource

public org.acegisecurity.intercept.ObjectDefinitionSource obtainObjectDefinitionSource()