magoffin.matt.ma2.aop
Class MediaItemIndexInterceptor

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

public class MediaItemIndexInterceptor
extends AbstractIndexInterceptor

Interceptor to support automatic indexing of updated MediaItem domain objects.

This interceptor supports any of the following:

  1. A MediaItem domain object as the returnValue
  2. A Long MediaItem ID as the returnValue
  3. A MediaInfoCommand intance as a method argument

Using the itemId of the found object, or the list of item IDs, this class will call the IndexBiz.indexMediaItem(Long) method to index the item.

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
MediaItemIndexInterceptor()
           
 
Method Summary
 void afterReturning(java.lang.Object returnValue, java.lang.reflect.Method method, java.lang.Object[] args, java.lang.Object target)
           
 AlbumDao getAlbumDao()
           
 org.springframework.context.MessageSource getMessages()
           
 org.springframework.transaction.support.TransactionTemplate getTransactionTemplate()
           
 WorkBiz getWorkBiz()
           
 void setAlbumDao(AlbumDao albumDao)
           
 void setMessages(org.springframework.context.MessageSource messages)
           
 void setTransactionTemplate(org.springframework.transaction.support.TransactionTemplate transactionTemplate)
           
 void setWorkBiz(WorkBiz workBiz)
           
 
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

MediaItemIndexInterceptor

public MediaItemIndexInterceptor()
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

getMessages

public org.springframework.context.MessageSource getMessages()
Returns:
the messages

setMessages

public void setMessages(org.springframework.context.MessageSource messages)
Parameters:
messages - the messages to set

getWorkBiz

public WorkBiz getWorkBiz()
Returns:
the workBiz

setWorkBiz

public void setWorkBiz(WorkBiz workBiz)
Parameters:
workBiz - the workBiz to set

getAlbumDao

public AlbumDao getAlbumDao()
Returns:
the albumDao

setAlbumDao

public void setAlbumDao(AlbumDao albumDao)
Parameters:
albumDao - the albumDao to set

getTransactionTemplate

public org.springframework.transaction.support.TransactionTemplate getTransactionTemplate()
Returns:
the transactionTemplate

setTransactionTemplate

public void setTransactionTemplate(org.springframework.transaction.support.TransactionTemplate transactionTemplate)
Parameters:
transactionTemplate - the transactionTemplate to set