Novell exteNd
Director 5.2 API

com.sssw.fw.event.api
Interface EbiVetoableStateChangeListener

All Superinterfaces:
EbiEventListener, EventListener

public interface EbiVetoableStateChangeListener
extends EbiEventListener

Represents a vetoable state change listener.

A state change may be any change that a listener may be interested in, primarily such events as changes in the lifecycle of a framework element (created, updated, deleted, etc.)

A vetoable event listener may veto an action that an event represents. If an event is vetoed, the corresponding action is forbidden. Vetoable listeners are expected to see events prior to the event producer acting upon them. In case multiple vetoable event listeners are registered with the producer, the latter is expected to notify them all, even if one of them vetoes the event.


Method Summary
 boolean vetoableStateChanged(EboStateChangeEvent event)
          Invoked when state changes (e.g.
 
Methods implemented from interface com.sssw.fw.event.api.EbiEventListener
getListenerDescription, getLog, setListenerDescription, setLog
 

Method Detail

vetoableStateChanged

public boolean vetoableStateChanged(EboStateChangeEvent event)
Invoked when state changes (e.g. an action occurred).

When an action (or operation) is vetoed the event producer throws a runtime exception EboOperationVetoedException. Because this is a runtime exception, it is not included in the throws clause of the operation methods. However you must handle the exception on any operation for which you register a vetoable listener. For example, if you add a vetoable listener that can veto EbiContentMgrDelegate.addDocument(), you would need to handle the exception like this:

 try
 {
    EbiContentMgmtDelegate cmgr = ...
    EbiAddDocumentParams params = ...
    EbiDocument doc = cmgr.addDocument(context, params);
    // provide code for adding document.....
 }
  catch (EboUnrecoverableSystemException ue)
 {
   // handle unrecoverable system exception
 }
 catch (EboSecurityException se)
 {
 // handle security exception
 }
 catch (EboItemExistenceException iee)
 {
 // handle item existence exception
 }
 catch (EboOperationVetoedException ove)
 {
  // handle operation vetoed exception
 }
 catch (Exception e)
 {
  // handle any other exception
  }
  
 }
 
Parameters:
event - the state change event
Returns:
true if the event is vetoed, false otherwise

Novell exteNd
Director 5.2 API