org.argouml.model
Interface ActivityGraphsHelper

All Known Implementing Classes:
AbstractActivityGraphsHelperDecorator

public interface ActivityGraphsHelper

The interface for the helper for ActivityGraphs.

Created from the old ActivityGraphsHelper.


Method Summary
 void addContent(java.lang.Object partition, java.lang.Object modeElement)
          Add a model element to a partition
 void addInState(java.lang.Object classifierInState, java.lang.Object state)
           
 void addParameter(java.lang.Object objectFlowState, java.lang.Object parameter)
          Add a Parameter to an ObjectFlowState.
 java.lang.Object findClassifierByName(java.lang.Object ofs, java.lang.String s)
          Finds the Classifier to which a given ObjectFlowState refers by its given name.
 java.lang.Object findStateByName(java.lang.Object c, java.lang.String s)
          Find a state of a Classifier by its name.
 boolean isAddingActivityGraphAllowed(java.lang.Object context)
          Returns true if an activitygraph may be added to the given context.
 void removeContent(java.lang.Object partition, java.lang.Object modeElement)
          Remove a model element from a partition
 void removeParameter(java.lang.Object objectFlowState, java.lang.Object parameter)
          Remove Parameter from an ObjectFlowState.
 void setContents(java.lang.Object partition, java.util.Collection newContents)
          Replace the complete collection of the partition contents by the given new one.
 void setInStates(java.lang.Object classifierInState, java.util.Collection newStates)
          Replace the complete collection of states by the given new one.
 void setParameters(java.lang.Object objectFlowState, java.util.Collection parameters)
           
 void setSynch(java.lang.Object objectFlowState, boolean isSynch)
          Set the isSynch attribute of an ObjectFlowState.
 

Method Detail

findClassifierByName

java.lang.Object findClassifierByName(java.lang.Object ofs,
                                      java.lang.String s)
Finds the Classifier to which a given ObjectFlowState refers by its given name. This function may be used for when the user types the name of a classifier in the diagram, in an ObjectFlowState.

Parameters:
ofs - the given ObjectFlowState
s - the given String that represents the name of the "type" Classifier
Returns:
the found classifier or null

findStateByName

java.lang.Object findStateByName(java.lang.Object c,
                                 java.lang.String s)
Find a state of a Classifier by its name. This routine is used to make the connection between a ClassifierInState and its State.

Parameters:
c - the Classifier. If this is not a Classifier, then IllegalArgumentException is thrown.
s - the string that represents the name of the state we are looking for. If "" or null, then null is returned straight away.
Returns:
the State (as Object) or null, if not found.

isAddingActivityGraphAllowed

boolean isAddingActivityGraphAllowed(java.lang.Object context)
Returns true if an activitygraph may be added to the given context. To decouple ArgoUML as much as possible from the model implementation, the parameter of the method is of type Object.

An ActivityGraph specifies the dynamics of

  1. a Package, or
  2. a Classifier (including UseCase), or
  3. a BehavioralFeature.

Parameters:
context - the given context
Returns:
boolean true if an activitygraph may be added

addInState

void addInState(java.lang.Object classifierInState,
                java.lang.Object state)
Parameters:
classifierInState - the classifierInState
state - the state that will be linked

setInStates

void setInStates(java.lang.Object classifierInState,
                 java.util.Collection newStates)
Replace the complete collection of states by the given new one. This function only modifies the model for added or removed states.

Parameters:
classifierInState - the ClassifierInState to be altered
newStates - the collection of states

setContents

void setContents(java.lang.Object partition,
                 java.util.Collection newContents)
Replace the complete collection of the partition contents by the given new one. This function only modifies the model for added or removed modelelements.

Parameters:
partition - the partition to be altered
newContents - the new contents of the partition (modelelements)

addContent

void addContent(java.lang.Object partition,
                java.lang.Object modeElement)
Add a model element to a partition

Parameters:
partition - the partition to contain the model element
modeElement - the model element to place in the partition

removeContent

void removeContent(java.lang.Object partition,
                   java.lang.Object modeElement)
Remove a model element from a partition

Parameters:
partition - the partition currently containing the model element
modeElement - the model element to be removed from the partition

setSynch

void setSynch(java.lang.Object objectFlowState,
              boolean isSynch)
Set the isSynch attribute of an ObjectFlowState.

Parameters:
objectFlowState - the element for which to set the attribute
isSynch - true if this ObjectFlowState is a synch state.

addParameter

void addParameter(java.lang.Object objectFlowState,
                  java.lang.Object parameter)
Add a Parameter to an ObjectFlowState.

Parameters:
objectFlowState - the ObjectFlowState
parameter - the Parameter

removeParameter

void removeParameter(java.lang.Object objectFlowState,
                     java.lang.Object parameter)
Remove Parameter from an ObjectFlowState.

Parameters:
objectFlowState - the ObjectFlowState
parameter - the Parameter to remove

setParameters

void setParameters(java.lang.Object objectFlowState,
                   java.util.Collection parameters)
Parameters:
objectFlowState - the ObjectFlowState.
parameters - the collection of Parameters. Pass Collections.EMPTY_SET if there are no Parameters.


ArgoUML © 1996-2006ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook