Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.acegisecurity.intercept.method.aspectj
Class AspectJSecurityInterceptor

    java.lang.Object
      org.acegisecurity.intercept.AbstractSecurityInterceptor
          org.acegisecurity.intercept.method.aspectj.AspectJSecurityInterceptor

All Implemented Interfaces:
  InitializingBean, ApplicationEventPublisherAware, MessageSourceAware

    public class AspectJSecurityInterceptor

extends AbstractSecurityInterceptor

Provides security interception of AspectJ method invocations.

The `ObjectDefinitionSource` required by this security interceptor is of type `MethodDefinitionSource`. This is shared with the AOP Alliance based security interceptor (`MethodSecurityInterceptor`), since both work with Java `Method`s.

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 `AbstractSecurityInterceptor` for details on the workflow.

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

Field Summary

Fields inherited from class org.acegisecurity.intercept.AbstractSecurityInterceptor
`logger, messages`

Constructor Summary
`AspectJSecurityInterceptor()`

Method Summary
`MethodDefinitionSource` | `getObjectDefinitionSource()`
`Class` | `getSecureObjectClass()` Indicates the type of secure objects the subclass will be presenting to the abstract parent for processing.
`Object` | `invoke(org.aspectj.lang.JoinPoint jp, AspectJCallback advisorProceed)` This method should be used to enforce security on a `JoinPoint`.
`ObjectDefinitionSource` | `obtainObjectDefinitionSource()`
`void` | `setObjectDefinitionSource(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`

Constructor Detail

### AspectJSecurityInterceptor

    public AspectJSecurityInterceptor()

Method Detail

### setObjectDefinitionSource

    public void setObjectDefinitionSource(MethodDefinitionSource newSource)

### getObjectDefinitionSource

    public MethodDefinitionSource getObjectDefinitionSource()

### getSecureObjectClass

    public Class getSecureObjectClass()

  Description copied from class: `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.

  Specified by:
    `getSecureObjectClass` in class `AbstractSecurityInterceptor`
  Returns:
    the type of secure object the subclass provides services for

### invoke

    public Object invoke(org.aspectj.lang.JoinPoint jp,
                         AspectJCallback advisorProceed)

  This method should be used to enforce security on a `JoinPoint`.

  Parameters:
    `jp` - The AspectJ joint point being invoked which requires a security decision
    `advisorProceed` - the advice-defined anonymous class that implements `AspectJCallback` containing a simple `return proceed();` statement
  Returns:
    The returned value from the method invocation

### obtainObjectDefinitionSource

    public ObjectDefinitionSource obtainObjectDefinitionSource()

  Specified by:
    `obtainObjectDefinitionSource` in class `AbstractSecurityInterceptor`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004-2005 Acegi Technology Pty Limited. All Rights Reserved.