org.scribble.protocol.util
Class InteractionUtil

java.lang.Object
  extended by org.scribble.protocol.util.InteractionUtil

public final class InteractionUtil
extends Object

This class provides utility functions for the interaction construct.


Nested Class Summary
static class InteractionUtil.InitialInteractionVisitor
          This class identifies the initial interaction.
 
Method Summary
static Role getFromRole(ModelObject act)
          This method gets the 'from' role associated with the activity.
static List<ModelObject> getInitialInteractions(ModelObject scope)
          This method determines the initial interactions associated with the supplied model object.
static MessageSignature getMessageSignature(ModelObject act)
          This method gets the message signature associated with the activity.
static Role getToRole(ModelObject act)
          This method gets the 'to' role associated with the activity.
static boolean isInitialInteraction(ModelObject scope, ModelObject interaction)
          This method determines whether the supplied interaction is the first within the supplied scope.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getFromRole

public static Role getFromRole(ModelObject act)
This method gets the 'from' role associated with the activity.

Parameters:
act - The activity
Returns:
The 'from' role if found

getToRole

public static Role getToRole(ModelObject act)
This method gets the 'to' role associated with the activity.

Parameters:
act - The activity
Returns:
The 'to' role if found

getMessageSignature

public static MessageSignature getMessageSignature(ModelObject act)
This method gets the message signature associated with the activity.

Parameters:
act - The activity
Returns:
The message signature if found

getInitialInteractions

public static List<ModelObject> getInitialInteractions(ModelObject scope)
This method determines the initial interactions associated with the supplied model object.

Parameters:
scope - The scope within which the search for initial interactions should be conducted
Returns:
The list of initial 'interaction' based activities

isInitialInteraction

public static boolean isInitialInteraction(ModelObject scope,
                                           ModelObject interaction)
This method determines whether the supplied interaction is the first within the supplied scope.

Parameters:
scope - The scope
interaction - The interaction
Returns:
Whether the interaction is an initial interaction in the supplied scope


Copyright © 2008-Present Scribble.org. All Rights Reserved.