|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.EventObject
org.nakedobjects.applib.events.InteractionEvent
public abstract class InteractionEvent
Represents an interaction with a domain object or a particular feature (property, collection, action) of a domain object.
Many of the interactions are checks for visibility,
usability and validity.
| Field Summary |
|---|
| Fields inherited from class java.util.EventObject |
|---|
source |
| Constructor Summary | |
|---|---|
InteractionEvent(Object source,
Identifier identifier)
|
|
| Method Summary | |
|---|---|
void |
advised(String reason,
Class<?> advisorClass)
Specify the reason that this interaction has been vetoed and the
class of the advisor that did the veto. |
Class<?> |
getAdvisorClass()
The class of the (first) advisor, if any, that provided the reason that this
interaction is vetoed. |
String |
getClassName()
Convenience method that returns the class name of the
identifier. |
String |
getClassNaturalName()
As per getClassName(), but naturalized. |
Identifier |
getIdentifier()
The Identifier of the feature of the object being interacted with. |
String |
getMemberName()
Convenience method that returns the member name of the
identifier. |
String |
getMemberNaturalName()
As per getMemberName(), but naturalized. |
String[] |
getMemberParameterNames()
Convenience method that returns the class name of the
identifier. |
String[] |
getMemberParameterNaturalNames()
As per #getMemberParameterName(), but naturalized. |
String |
getReason()
The reason, if any, that this interaction may have been vetoed or otherwise disallowed. |
Object |
getSource()
The domain object (pojo) against which the interaction occurred. |
boolean |
isVeto()
Whether this interaction has been vetoed (meaning that getReason() and
getAdvisorClass() will both be non-null and the reason
non-empty.) |
| Methods inherited from class java.util.EventObject |
|---|
toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public InteractionEvent(Object source,
Identifier identifier)
| Method Detail |
|---|
public Object getSource()
getSource in class EventObjectpublic Identifier getIdentifier()
Identifier of the feature of the object being interacted with.
Will be consistent with the subclass of InteractionEvent. So for example a
PropertyModifyEvent will have an Identifier that identifies the property being
modified.
public String getClassName()
class name of the
identifier.
getIdentifier()public String getClassNaturalName()
getClassName(), but naturalized.
public String getMemberName()
member name of the
identifier.
getIdentifier()public String getMemberNaturalName()
getMemberName(), but naturalized.
public String[] getMemberParameterNames()
class name of the
identifier.
public String[] getMemberParameterNaturalNames()
#getMemberParameterName(), but naturalized.
public String getReason()
Intended to be set as a result of consulting one of the facets.
public Class<?> getAdvisorClass()
reason that this
interaction is vetoed.
public void advised(String reason,
Class<?> advisorClass)
reason that this interaction has been vetoed and the
class of the advisor that did the veto.
public boolean isVeto()
getReason() and
getAdvisorClass() will both be non-null and the reason
non-empty.)
The interpretation of this depends on the subclass:
VisibilityEvent, a veto means that the feature (property, collection, action) is
hiddenUsabilityEvent, a veto means that the feature is disabledValidityEvent, a veto means that the proposed modification (property value, object
added/removed, action argument) is invalid
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||