magoffin.matt.ma2.aop
Class MediaItemDeleteIndexInterceptor

java.lang.Object
  extended by magoffin.matt.ma2.aop.AbstractIndexInterceptor
      extended by magoffin.matt.ma2.aop.MediaItemDeleteIndexInterceptor
All Implemented Interfaces:
org.aopalliance.aop.Advice, org.springframework.aop.AfterReturningAdvice

public class MediaItemDeleteIndexInterceptor
extends AbstractIndexInterceptor

Interceptor to support removal of MediaItem domain objects from the search index.

This interceptor will first inspect the returned object. If this is a MediaItem or array of MediaItem then those the item IDs of those items will be passed to IndexBiz.removeMediaItemFromIndex(Long).

Otherwise if a Long array value exists on the args parameter passed to the afterReturning(Object, Method, Object[], Object) method, it will assume the first Long[] object found is an array of MediaItem.getItemId() values that should be removed from the media item index via IndexBiz.removeMediaItemFromIndex(Long).

Version:
$Revision: 43 $ $Date: 2007-10-21 11:10:01 +1300 (Sun, 21 Oct 2007) $
Author:
Matt Magoffin (spamsqr@msqr.us)

Field Summary
 
Fields inherited from class magoffin.matt.ma2.aop.AbstractIndexInterceptor
log
 
Constructor Summary
MediaItemDeleteIndexInterceptor()
           
 
Method Summary
 void afterReturning(java.lang.Object returnValue, java.lang.reflect.Method method, java.lang.Object[] args, java.lang.Object target)
           
 
Methods inherited from class magoffin.matt.ma2.aop.AbstractIndexInterceptor
getIndexBiz, setIndexBiz
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MediaItemDeleteIndexInterceptor

public MediaItemDeleteIndexInterceptor()
Method Detail

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
Throws:
java.lang.Throwable