org.nakedobjects.metamodel.consent
Class InteractionResult

java.lang.Object
  extended by org.nakedobjects.metamodel.consent.InteractionResult

public class InteractionResult
extends java.lang.Object


Constructor Summary
InteractionResult(InteractionEvent interactionEvent)
           
 
Method Summary
 void advise(java.lang.String reason, InteractionAdvisorFacet facet)
           
 Consent createConsent()
           
 InteractionAdvisorFacet getAdvisorFacet()
          Returns the first of the getAdvisorFacets() that has been advised, or null if none yet.
 java.util.List<InteractionAdvisorFacet> getAdvisorFacets()
          Returns all facets that have appended reasons to the buffer.
 InteractionEvent getInteractionEvent()
          Returns the contained InteractionEvent, if necessary updated with the advice of the interactions.
 java.lang.String getReason()
          Gets the reason as currently known, but does not change the state.
 boolean isNotVetoing()
           
 boolean isVetoing()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InteractionResult

public InteractionResult(InteractionEvent interactionEvent)
Method Detail

getInteractionEvent

public InteractionEvent getInteractionEvent()
Returns the contained InteractionEvent, if necessary updated with the advice of the interactions.

That is, if still advising, then copies over the details from this result into the contained InteractionEvent, and flips into advised (done).

Returns:

advise

public void advise(java.lang.String reason,
                   InteractionAdvisorFacet facet)

isVetoing

public boolean isVetoing()

isNotVetoing

public boolean isNotVetoing()

getAdvisorFacet

public InteractionAdvisorFacet getAdvisorFacet()
Returns the first of the getAdvisorFacets() that has been advised, or null if none yet.

See Also:
getAdvisorFacets()

getAdvisorFacets

public java.util.List<InteractionAdvisorFacet> getAdvisorFacets()
Returns all facets that have appended reasons to the buffer.

See Also:
getAdvisorFacet()

createConsent

public Consent createConsent()

getReason

public java.lang.String getReason()
Gets the reason as currently known, but does not change the state.

If isNotVetoing(), then returns null. Otherwise will be a non-empty string.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2001-2009 Naked Objects Group Ltd.. All Rights Reserved.