net.sf.genuine.organizer
Class MessageVetoException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended bynet.sf.genuine.organizer.MessageVetoException
All Implemented Interfaces:
java.io.Serializable

public class MessageVetoException
extends java.lang.Exception

This exception is thrown if a message listener files a veto against a message. As this exception does not indicate a program error but normal behavior, no logging is done.

The veto mechanism is similar to the Java Swing's property veto mechanism: If a vetoable message is sent, first, all listeners are asked whether they file a veto against the message. In that case, they throw a VetoException. Only if no exception has been thrown the message is delivered to the receivers. Otherwise, the message is not delivered and the sender has to catch the exception and handle it.

The exception may take a resource item that contains explanatory text for the user. You might pass an object of this class to HelperService.showException(Exception) and the explanatory text is shown to the user in a message box.

Author:
Tim Wellhausen
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.lang.Exception
 
Constructor Summary
MessageVetoException()
          Creates a new exception
MessageVetoException(ResourceItem explanatoryResourceItem)
          Creates a new exception that includes a resource item which contains explanatory text for the user.
MessageVetoException(java.lang.String explanatoryResourceItemName)
          Creates a new exception that includes a resource item which contains explanatory text for the user.
 
Method Summary
 ResourceItem getExplanatoryResourceItem()
          Returns a resource item that contains explanatory text for the user if such an item has been passed.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MessageVetoException

public MessageVetoException()
Creates a new exception


MessageVetoException

public MessageVetoException(ResourceItem explanatoryResourceItem)
Creates a new exception that includes a resource item which contains explanatory text for the user.

Parameters:
explanatoryResourceItem - The actual resource item

MessageVetoException

public MessageVetoException(java.lang.String explanatoryResourceItemName)
Creates a new exception that includes a resource item which contains explanatory text for the user.

Parameters:
explanatoryResourceItemName - The name of the resource item
Method Detail

getExplanatoryResourceItem

public ResourceItem getExplanatoryResourceItem()
Returns a resource item that contains explanatory text for the user if such an item has been passed.