|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.EventObject
org.openbp.jaspira.event.JaspiraEvent
org.openbp.jaspira.event.VetoableEvent
public class VetoableEvent
Event that precedes vetoable changes. Allows plugins to veto, i.e. prevent the execution of a certain action.
| Field Summary | |
|---|---|
protected java.lang.Object |
newObject
A second message object useful for oldState - newState messages. |
boolean |
vetoed
Indicates if a veto has been received, never changes back once true. |
| Fields inherited from class org.openbp.jaspira.event.JaspiraEvent |
|---|
CONSUMED, HANDELED, STACKABLE, TYPE_BOTTOM_UP, TYPE_DIRECT, TYPE_FLOOD, TYPE_GLOBAL, UNCONSUMABLE |
| Fields inherited from class java.util.EventObject |
|---|
source |
| Constructor Summary | |
|---|---|
VetoableEvent(Plugin source,
java.lang.String eventName)
Creates a VetoEvent without additional information. |
|
VetoableEvent(Plugin source,
java.lang.String eventName,
java.lang.Object object)
Creates a VetoEvent with a single message object. |
|
VetoableEvent(Plugin source,
java.lang.String eventName,
java.lang.Object oldObject,
java.lang.Object newObject)
Creates a new VetoEvent with an old and a new state. |
|
| Method Summary | |
|---|---|
java.lang.Object |
getNewObject()
Returns the new Object or null if none. |
java.lang.Object |
getOldObject()
Returns the old state. |
boolean |
isVetoed()
Returns the veto-status of this event. |
void |
veto()
Places a veto, i\.e\. sets vetoed to true. |
| Methods inherited from class org.openbp.jaspira.event.JaspiraEvent |
|---|
brand, getBrand, getEventGroup, getEventName, getFlags, getLevel, getObject, getOriginalEvent, getSourcePlugin, getTargetClassName, getTargetPluginId, getType, isConsumed, isStackable, isUnconsumable, setObject, setTargetClassName, setTargetPluginId, toString, updateFlags, updateFlags |
| Methods inherited from class java.util.EventObject |
|---|
getSource |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public boolean vetoed
protected java.lang.Object newObject
| Constructor Detail |
|---|
public VetoableEvent(Plugin source,
java.lang.String eventName,
java.lang.Object oldObject,
java.lang.Object newObject)
source - The plugin that dispatches this event. Must not be null.
Will be converted to lower case.eventName - The name of the eventoldObject - Original object. Can be null.newObject - Modified object. Can be null.
public VetoableEvent(Plugin source,
java.lang.String eventName)
source - The plugin that dispatches this event. Must not be null.
Will be converted to lower case.eventName - The name of the event
public VetoableEvent(Plugin source,
java.lang.String eventName,
java.lang.Object object)
source - The plugin that dispatches this event. Must not be null.
Will be converted to lower case.eventName - The name of the eventobject - The argument object| Method Detail |
|---|
public boolean isVetoed()
public void veto()
public java.lang.Object getOldObject()
public java.lang.Object getNewObject()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||