org.openwms.core.service.spring.aop
Class UserChangedEventAspect

java.lang.Object
  extended by org.openwms.core.service.spring.aop.UserChangedEventAspect

@Component(value="userChangedEventAspect")
public class UserChangedEventAspect
extends Object

An UserChangedEventAspect fires events after a method invocation completes. It's main purpose is to fire events after a transaction succeeds, thereby the advice must be enabled around Spring's Transaction advice.

Use the FireAfterTransaction event and declare some type of events inside the value attribute. Instances of these events will then be fired after the transaction completes.

Example:
 @FireAfterTransaction(events = { UserChangedEvent.class })
 public User save(User user) { .. }
 

The component can be referenced by name "userChangedEventAspect".

Since:
0.1
Version:
$Revision: 1539 $
Author:
Heiko Scherrer
See Also:
FireAfterTransaction

Field Summary
static String COMPONENT_NAME
          Springs component name.
 
Constructor Summary
UserChangedEventAspect()
           
 
Method Summary
 void fireUserEvent(Object publisher, FireAfterTransaction events)
          Only ApplicationEvents are created and published over Springs ApplicationContext.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMPONENT_NAME

public static final String COMPONENT_NAME
Springs component name.

See Also:
Constant Field Values
Constructor Detail

UserChangedEventAspect

public UserChangedEventAspect()
Method Detail

fireUserEvent

public void fireUserEvent(Object publisher,
                          FireAfterTransaction events)
                   throws Throwable
Only ApplicationEvents are created and published over Springs ApplicationContext.

Parameters:
publisher - The instance that is publishing the event
events - A list of event classes to fire
Throws:
Throwable - Any exception is re-thrown


Copyright © 2005-2011 openwms.org. All Rights Reserved.