lumis.portal.event
Class PortalEventManager

Package class diagram package PortalEventManager
java.lang.Object
  extended by lumis.portal.event.PortalEventManager
All Implemented Interfaces:
IPortalEventManager

public class PortalEventManager
extends Object
implements IPortalEventManager

Implementation of event management.

Since:
4.0.8

Constructor Summary
PortalEventManager()
           
 
Method Summary
 String addObserver(SessionConfig sessionConfig, ObserverConfig observerConfig, ITransaction transaction)
          Adds an observer to the persistence.
 void deleteObserver(SessionConfig sessionConfig, String observerId, ITransaction transaction)
          Deletes an observer configuration from persistence.
 ObserverConfig getObserver(SessionConfig sessionConfig, String observerId, ITransaction transaction)
          Returns an observer configuration.
 ObserverConfig getObserverByClassName(SessionConfig sessionConfig, String observerClassName, ITransaction transaction)
          Searches for an observer configuration based on its class name.
 void initObservers(SessionConfig sessionConfig, ITransaction transaction)
          Initializes the observers.
 void notifyObservers(IPortalEvent event)
          Notify event observers of the given event.
 void notifyObservers(Object event)
          Deprecated. 
 void registerObservers(SessionConfig sessionConfig, String observersConfigPath, ITransaction transaction)
          Registers the observers in the specified observer configuration file.
 void updateObserver(SessionConfig sessionConfig, ObserverConfig observerConfig, ITransaction transaction)
          Updates an observer configuration in persistence.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PortalEventManager

public PortalEventManager()
Method Detail

registerObservers

public void registerObservers(SessionConfig sessionConfig,
                              String observersConfigPath,
                              ITransaction transaction)
                       throws ManagerException,
                              PortalException
Description copied from interface: IPortalEventManager
Registers the observers in the specified observer configuration file.

Specified by:
registerObservers in interface IPortalEventManager
Parameters:
sessionConfig - the user session information.
observersConfigPath - the path to the observer configuration file, relative to the definition folder.
transaction - the transaction for persistence access.
Throws:
ManagerException
PortalException

initObservers

public void initObservers(SessionConfig sessionConfig,
                          ITransaction transaction)
                   throws ManagerException,
                          PortalException
Description copied from interface: IPortalEventManager
Initializes the observers.

Specified by:
initObservers in interface IPortalEventManager
Parameters:
sessionConfig - the user session information.
transaction - the transaction for persistence access.
Throws:
ManagerException
PortalException

getObserver

public ObserverConfig getObserver(SessionConfig sessionConfig,
                                  String observerId,
                                  ITransaction transaction)
                           throws ManagerException,
                                  PortalException
Description copied from interface: IPortalEventManager
Returns an observer configuration.

Specified by:
getObserver in interface IPortalEventManager
Parameters:
sessionConfig - the user session information.
observerId - the observer's identifier.
transaction - the transaction for persistence access.
Returns:
Returns the observer configuration.
Throws:
ManagerException
PortalException

getObserverByClassName

public ObserverConfig getObserverByClassName(SessionConfig sessionConfig,
                                             String observerClassName,
                                             ITransaction transaction)
                                      throws ManagerException,
                                             PortalException
Description copied from interface: IPortalEventManager
Searches for an observer configuration based on its class name.

Specified by:
getObserverByClassName in interface IPortalEventManager
Parameters:
sessionConfig - the user session information.
observerClassName - the observer's class name.
transaction - the transaction for persistence access.
Returns:
Returns the observer configuration.
Throws:
ManagerException
PortalException

addObserver

public String addObserver(SessionConfig sessionConfig,
                          ObserverConfig observerConfig,
                          ITransaction transaction)
                   throws ManagerException,
                          PortalException
Description copied from interface: IPortalEventManager
Adds an observer to the persistence. The corresponding observer implementation will be initialized after the transaction is committed.

Specified by:
addObserver in interface IPortalEventManager
Parameters:
sessionConfig - the user session information.
observerConfig - the observer configuration.
transaction - the transaction for persistence access.
Returns:
the identifier for the observer configuration saved.
Throws:
ManagerException
PortalException

updateObserver

public void updateObserver(SessionConfig sessionConfig,
                           ObserverConfig observerConfig,
                           ITransaction transaction)
                    throws ManagerException,
                           PortalException
Description copied from interface: IPortalEventManager
Updates an observer configuration in persistence. The corresponding observer implementation will be initialized after the transaction is committed.

Specified by:
updateObserver in interface IPortalEventManager
Parameters:
sessionConfig - the user session information.
observerConfig - the observer configuration.
transaction - the transaction for persistence access.
Throws:
ManagerException
PortalException

deleteObserver

public void deleteObserver(SessionConfig sessionConfig,
                           String observerId,
                           ITransaction transaction)
                    throws ManagerException,
                           PortalException
Description copied from interface: IPortalEventManager
Deletes an observer configuration from persistence. The corresponding observer implementation will cease to be notified of events after the transaction is committed.

Specified by:
deleteObserver in interface IPortalEventManager
Parameters:
sessionConfig - the user session information.
observerId - the observer's identifier.
transaction - the transaction for persistence access.
Throws:
ManagerException
PortalException

notifyObservers

@Deprecated
public void notifyObservers(Object event)
Deprecated. 

Specified by:
notifyObservers in interface IPortalEventManager

notifyObservers

public void notifyObservers(IPortalEvent event)
                     throws PortalException
Description copied from interface: IPortalEventManager
Notify event observers of the given event.

Specified by:
notifyObservers in interface IPortalEventManager
Parameters:
event - the event.
Throws:
PortalException - if an observer throws an exception.


Lumisportal  4.1.0.071221 - Copyright © 2001-2007, Lumis. All Rights Reserved.