Oracle Data-aware Controls Reference

oracle.dacf.util.errormanager
Interface ErrorManagerListener

All Superinterfaces:
java.util.EventListener

public interface ErrorManagerListener
extends java.util.EventListener

Defines the interface for ErrorManager event listeners. Event listeners must implement this interface. A listener that implements this interface provides a mechanism to handle an error event. The error listener is notified by the ErrorManager whenever an error event occurs. The events can be:

When an error is added or removed, the ErrorManager notifies all registered error listeners. When adding or removing an error message the ErrorManager notifies the error listeners by calling addingErrorMessage(ErrorMessage) or removingErrorMessage(ErrorMessage), respectively.

Any listener can veto the addition or removal of the error by calling an ErrorMessageVetoException. If the listener calls the exception and vetos the event, the error will be rolled back, and loggers will not be informed of the event. If the listener does not call the exception, the error will be delivered to the loggers.

See Also:
ErrorManager, ErrorMessage, ErrorMessageVetoException

Method Summary
 void addingErrorMessage(ErrorMessage msg)
          Called when the ErrorManager has been requested to add an error message.
 java.lang.String getName()
          Returns the name of the listener.
 void removingErrorMessage(ErrorMessage msg)
          Called when the ErrorManager has been requested to remove a specific error message.
 void rollingBackAddingErrorMessage(ErrorMessage msg)
          Called when this error has been added, but another listener vetoes the event.
 void rollingBackRemovingErrorMessage(ErrorMessage msg)
          Called when this error has been removed, but another Listener vetoes the event.
 

Method Detail

getName

public java.lang.String getName()
Returns the name of the listener. This method is called by the ErrorManager to ensure that it is registering a listener with a unique name.
Returns:
the name.

addingErrorMessage

public void addingErrorMessage(ErrorMessage msg)
                        throws ErrorMessageVetoException
Called when the ErrorManager has been requested to add an error message. The listener can veto the event by throwing an ErrorMessageVetoException. If a listener vetoes, all listeners already notified of the event will receive a rollback error. The rollback cannot be vetoed.
Parameters:
msg - the error message being added.
Throws:
ErrorMessageVetoException - if the listener wishes to veto the event.

removingErrorMessage

public void removingErrorMessage(ErrorMessage msg)
                          throws ErrorMessageVetoException
Called when the ErrorManager has been requested to remove a specific error message. The listener can veto the event by throwing a ErrorMessageVetoException. If a listener vetoes, all listeners already notified of the event will receive a rollback error. The rollback cannot be vetoed.
Parameters:
msg - the error message being removed.
Throws:
ErrorMessageVetoException - if the listener wishes to veto the event.

rollingBackAddingErrorMessage

public void rollingBackAddingErrorMessage(ErrorMessage msg)
Called when this error has been added, but another listener vetoes the event. The adding of an error event is rolledback and the loggers are not notified of the error. This method cannot be vetoed.
Parameters:
msg - the error message being added and vetoed by another listener.

rollingBackRemovingErrorMessage

public void rollingBackRemovingErrorMessage(ErrorMessage msg)
Called when this error has been removed, but another Listener vetoes the event. The error removal event is rolledback and the loggers are not notified of the error. This method cannot be vetoed.
Parameters:
msg - the error message being removed and vetoed by another listener.

Oracle Data-aware Controls Reference