org.argouml.model
Class AbstractCommonBehaviorHelperDecorator

java.lang.Object
  extended by org.argouml.model.AbstractCommonBehaviorHelperDecorator
All Implemented Interfaces:
CommonBehaviorHelper

public abstract class AbstractCommonBehaviorHelperDecorator
extends java.lang.Object
implements CommonBehaviorHelper

An abstract Decorator for the CommonBehaviorHelper.


Constructor Summary
protected AbstractCommonBehaviorHelperDecorator(CommonBehaviorHelper component)
           
 
Method Summary
 void addAction(java.lang.Object handle, int position, java.lang.Object action)
          Inserts an action at the specified position in an action sequence.
 void addAction(java.lang.Object handle, java.lang.Object action)
          Add an action to action sequence.
 void addActualArgument(java.lang.Object handle, int position, java.lang.Object argument)
          Adds an actual argument to an action.
 void addActualArgument(java.lang.Object handle, java.lang.Object argument)
          Adds an actual argument to an action.
 void addClassifier(java.lang.Object handle, java.lang.Object classifier)
          Adds a Classifier to an Instance.
 void addStimulus(java.lang.Object handle, java.lang.Object stimulus)
          Adds a stimulus to a action or link.
 java.lang.Object getActionOwner(java.lang.Object handle)
          Return the owner of an action.
protected  CommonBehaviorHelper getComponent()
          The component we are decorating.
 java.lang.Object getDestination(java.lang.Object link)
          Returns the destination of a link.
 java.lang.Object getInstantiation(java.lang.Object createaction)
          Returns the instance which the create action creates.
 java.lang.Object getSource(java.lang.Object link)
          Returns the source of a link.
 void removeAction(java.lang.Object handle, java.lang.Object action)
          Remove an Action from an ActionSequence.
 void removeActualArgument(java.lang.Object handle, java.lang.Object argument)
          Removes the actual Argument from an Action.
 void removeClassifier(java.lang.Object handle, java.lang.Object classifier)
          This method classifier from an instance.
 void removeContext(java.lang.Object handle, java.lang.Object context)
          Remove the given context (BehavioralFeature) from a Signal.
 void removeReception(java.lang.Object handle, java.lang.Object reception)
          Remove a given Reception from a given Signal.
 void setActualArguments(java.lang.Object action, java.util.List arguments)
          This method replaces all arguments of the given action by the given list of arguments.
 void setAsynchronous(java.lang.Object handle, boolean value)
          Sets the asynchronous property of an action.
 void setClassifiers(java.lang.Object handle, java.util.Collection classifiers)
          Sets the classifiers of the given instance.
 void setCommunicationLink(java.lang.Object handle, java.lang.Object c)
          Sets the communicationLink between a link c and a stimulus handle.
 void setComponentInstance(java.lang.Object handle, java.lang.Object c)
           
 void setContexts(java.lang.Object handle, java.util.Collection c)
          Sets the contexts for a Signal.
 void setDispatchAction(java.lang.Object handle, java.lang.Object value)
          Sets the dispatch action for some stimulus.
 void setInstance(java.lang.Object handle, java.lang.Object inst)
          Sets the given Instance to the given LinkEnd or AttributeLink.
 void setInstantiation(java.lang.Object createaction, java.lang.Object instantiation)
          Set the instantiation for a create action.
 void setNodeInstance(java.lang.Object handle, java.lang.Object nodeInstance)
          Set the NodeInstance of a ComponentInstance.
 void setOperation(java.lang.Object handle, java.lang.Object operation)
          Set the Operation of a CallAction or CallEvent.
 void setReceiver(java.lang.Object handle, java.lang.Object receiver)
          Sets the receiver of some model element.
 void setReception(java.lang.Object handle, java.util.Collection c)
          Sets the collection of receptions for a Sinal.
 void setRecurrence(java.lang.Object handle, java.lang.Object expr)
          Set the recurrence of an Action.
 void setScript(java.lang.Object handle, java.lang.Object expr)
          Set the Expression (script) for an Action.
 void setSender(java.lang.Object handle, java.lang.Object sender)
          Sets the sender of some model element.
 void setSignal(java.lang.Object handle, java.lang.Object signal)
          Set the Signal.
 void setSpecification(java.lang.Object handle, java.lang.String specification)
           
 void setTarget(java.lang.Object handle, java.lang.Object element)
          Sets the target of some action or transition.
 void setTransition(java.lang.Object handle, java.lang.Object trans)
          Set the Transition of a guard or effect (Action).
 void setValue(java.lang.Object handle, java.lang.Object value)
          Set the value of an Argument or AttributeLink.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractCommonBehaviorHelperDecorator

protected AbstractCommonBehaviorHelperDecorator(CommonBehaviorHelper component)
Parameters:
component - The component to decorate.
Method Detail

getComponent

protected CommonBehaviorHelper getComponent()
The component we are decorating.

Returns:
Returns the component.

getSource

public java.lang.Object getSource(java.lang.Object link)
Description copied from interface: CommonBehaviorHelper
Returns the source of a link. The source of a binary link is defined as the instance where the first linkend is pointing to via the association instance.

Specified by:
getSource in interface CommonBehaviorHelper
Parameters:
link - the given link
Returns:
MInstance the source of the given link

getDestination

public java.lang.Object getDestination(java.lang.Object link)
Description copied from interface: CommonBehaviorHelper
Returns the destination of a link. The destination of a binary link is defined as the instance where the second linkend is pointing to via the association instance.

Specified by:
getDestination in interface CommonBehaviorHelper
Parameters:
link - the given link
Returns:
MInstance the destination of the given link

removeActualArgument

public void removeActualArgument(java.lang.Object handle,
                                 java.lang.Object argument)
Description copied from interface: CommonBehaviorHelper
Removes the actual Argument from an Action.

Specified by:
removeActualArgument in interface CommonBehaviorHelper
Parameters:
handle - Action
argument - Argument

setActualArguments

public void setActualArguments(java.lang.Object action,
                               java.util.List arguments)
Description copied from interface: CommonBehaviorHelper
This method replaces all arguments of the given action by the given list of arguments.

Specified by:
setActualArguments in interface CommonBehaviorHelper
Parameters:
action - the given action
arguments - the new arguments

removeClassifier

public void removeClassifier(java.lang.Object handle,
                             java.lang.Object classifier)
Description copied from interface: CommonBehaviorHelper
This method classifier from an instance.

Specified by:
removeClassifier in interface CommonBehaviorHelper
Parameters:
handle - is the instance
classifier - is the classifier

removeContext

public void removeContext(java.lang.Object handle,
                          java.lang.Object context)
Description copied from interface: CommonBehaviorHelper
Remove the given context (BehavioralFeature) from a Signal.

Specified by:
removeContext in interface CommonBehaviorHelper
Parameters:
handle - Signal
context - BehavioralFeature

removeReception

public void removeReception(java.lang.Object handle,
                            java.lang.Object reception)
Description copied from interface: CommonBehaviorHelper
Remove a given Reception from a given Signal.

Specified by:
removeReception in interface CommonBehaviorHelper
Parameters:
handle - the Signal
reception - the Reception

addActualArgument

public void addActualArgument(java.lang.Object handle,
                              java.lang.Object argument)
Description copied from interface: CommonBehaviorHelper
Adds an actual argument to an action.

Specified by:
addActualArgument in interface CommonBehaviorHelper
Parameters:
handle - the action
argument - the argument

addActualArgument

public void addActualArgument(java.lang.Object handle,
                              int position,
                              java.lang.Object argument)
Description copied from interface: CommonBehaviorHelper
Adds an actual argument to an action.

Specified by:
addActualArgument in interface CommonBehaviorHelper
Parameters:
handle - the action
position - the 0-based position at which to insert the actualArgument
argument - the argument

addClassifier

public void addClassifier(java.lang.Object handle,
                          java.lang.Object classifier)
Description copied from interface: CommonBehaviorHelper
Adds a Classifier to an Instance.

Specified by:
addClassifier in interface CommonBehaviorHelper
Parameters:
handle - Instance
classifier - Classifier

addStimulus

public void addStimulus(java.lang.Object handle,
                        java.lang.Object stimulus)
Description copied from interface: CommonBehaviorHelper
Adds a stimulus to a action or link.

Specified by:
addStimulus in interface CommonBehaviorHelper
Parameters:
handle - the action or link
stimulus - is the stimulus

setAsynchronous

public void setAsynchronous(java.lang.Object handle,
                            boolean value)
Description copied from interface: CommonBehaviorHelper
Sets the asynchronous property of an action.

Specified by:
setAsynchronous in interface CommonBehaviorHelper
Parameters:
handle - the action
value - the value to alter the asynchronous property to

setOperation

public void setOperation(java.lang.Object handle,
                         java.lang.Object operation)
Description copied from interface: CommonBehaviorHelper
Set the Operation of a CallAction or CallEvent.

Specified by:
setOperation in interface CommonBehaviorHelper
Parameters:
handle - CallAction or CallEvent
operation - Operation

setClassifiers

public void setClassifiers(java.lang.Object handle,
                           java.util.Collection classifiers)
Description copied from interface: CommonBehaviorHelper
Sets the classifiers of the given instance.

Specified by:
setClassifiers in interface CommonBehaviorHelper
Parameters:
handle - is the instance
classifiers - collection of classifiers

setCommunicationLink

public void setCommunicationLink(java.lang.Object handle,
                                 java.lang.Object c)
Description copied from interface: CommonBehaviorHelper
Sets the communicationLink between a link c and a stimulus handle.

Specified by:
setCommunicationLink in interface CommonBehaviorHelper
Parameters:
handle - the stimulus
c - the link

setComponentInstance

public void setComponentInstance(java.lang.Object handle,
                                 java.lang.Object c)
Specified by:
setComponentInstance in interface CommonBehaviorHelper
Parameters:
handle - Instance
c - ComponentInstance or null

setContexts

public void setContexts(java.lang.Object handle,
                        java.util.Collection c)
Description copied from interface: CommonBehaviorHelper
Sets the contexts for a Signal.

Specified by:
setContexts in interface CommonBehaviorHelper
Parameters:
handle - the Signal
c - the collection of contexts

setDispatchAction

public void setDispatchAction(java.lang.Object handle,
                              java.lang.Object value)
Description copied from interface: CommonBehaviorHelper
Sets the dispatch action for some stimulus.

Specified by:
setDispatchAction in interface CommonBehaviorHelper
Parameters:
handle - the stimulus
value - the action. Can be null.

setInstance

public void setInstance(java.lang.Object handle,
                        java.lang.Object inst)
Description copied from interface: CommonBehaviorHelper
Sets the given Instance to the given LinkEnd or AttributeLink.

Specified by:
setInstance in interface CommonBehaviorHelper
Parameters:
handle - LinkEnd or AttributeLink
inst - null or Instance

setNodeInstance

public void setNodeInstance(java.lang.Object handle,
                            java.lang.Object nodeInstance)
Description copied from interface: CommonBehaviorHelper
Set the NodeInstance of a ComponentInstance.

Specified by:
setNodeInstance in interface CommonBehaviorHelper
Parameters:
handle - ComponentInstance
nodeInstance - NodeInstance

setReceiver

public void setReceiver(java.lang.Object handle,
                        java.lang.Object receiver)
Description copied from interface: CommonBehaviorHelper
Sets the receiver of some model element.

Specified by:
setReceiver in interface CommonBehaviorHelper
Parameters:
handle - model element
receiver - the receiver

setReception

public void setReception(java.lang.Object handle,
                         java.util.Collection c)
Description copied from interface: CommonBehaviorHelper
Sets the collection of receptions for a Sinal.

Specified by:
setReception in interface CommonBehaviorHelper
Parameters:
handle - the signal
c - a collection with receptions

setRecurrence

public void setRecurrence(java.lang.Object handle,
                          java.lang.Object expr)
Description copied from interface: CommonBehaviorHelper
Set the recurrence of an Action.

Specified by:
setRecurrence in interface CommonBehaviorHelper
Parameters:
handle - Action
expr - IterationExpression

setScript

public void setScript(java.lang.Object handle,
                      java.lang.Object expr)
Description copied from interface: CommonBehaviorHelper
Set the Expression (script) for an Action.

Specified by:
setScript in interface CommonBehaviorHelper
Parameters:
handle - Action
expr - the script (ActionExpression)

setSender

public void setSender(java.lang.Object handle,
                      java.lang.Object sender)
Description copied from interface: CommonBehaviorHelper
Sets the sender of some model element.

Specified by:
setSender in interface CommonBehaviorHelper
Parameters:
handle - model element
sender - the sender

setSignal

public void setSignal(java.lang.Object handle,
                      java.lang.Object signal)
Description copied from interface: CommonBehaviorHelper
Set the Signal.

Specified by:
setSignal in interface CommonBehaviorHelper
Parameters:
handle - SendAction or Reception or SignalEvent
signal - Signal or null

setSpecification

public void setSpecification(java.lang.Object handle,
                             java.lang.String specification)
Specified by:
setSpecification in interface CommonBehaviorHelper
Parameters:
handle - a reception
specification - the specification

setTarget

public void setTarget(java.lang.Object handle,
                      java.lang.Object element)
Description copied from interface: CommonBehaviorHelper
Sets the target of some action or transition.

Specified by:
setTarget in interface CommonBehaviorHelper
Parameters:
handle - the model element
element - the target of the model elemnet

setTransition

public void setTransition(java.lang.Object handle,
                          java.lang.Object trans)
Description copied from interface: CommonBehaviorHelper
Set the Transition of a guard or effect (Action).

Specified by:
setTransition in interface CommonBehaviorHelper
Parameters:
handle - the Guard or Action
trans - the Transition

setValue

public void setValue(java.lang.Object handle,
                     java.lang.Object value)
Description copied from interface: CommonBehaviorHelper
Set the value of an Argument or AttributeLink.

NOTE: This method used allow setting the dataValue of a TaggedValue. This usage is deprecated.

Specified by:
setValue in interface CommonBehaviorHelper
Parameters:
handle - the Object of which the value will be set
value - the value to set. If handle is an Argument, the value must be an Expression. If it's an AttributeLink, the value must be an Instance.

getInstantiation

public java.lang.Object getInstantiation(java.lang.Object createaction)
Description copied from interface: CommonBehaviorHelper
Returns the instance which the create action creates.

Specified by:
getInstantiation in interface CommonBehaviorHelper
Parameters:
createaction - the create action
Returns:
the instantiation of the create action

setInstantiation

public void setInstantiation(java.lang.Object createaction,
                             java.lang.Object instantiation)
Description copied from interface: CommonBehaviorHelper
Set the instantiation for a create action.

Specified by:
setInstantiation in interface CommonBehaviorHelper
Parameters:
createaction - the action
instantiation - the classifier

getActionOwner

public java.lang.Object getActionOwner(java.lang.Object handle)
Description copied from interface: CommonBehaviorHelper
Return the owner of an action.

Specified by:
getActionOwner in interface CommonBehaviorHelper
Parameters:
handle - the action
Returns:
owning element of this action

addAction

public void addAction(java.lang.Object handle,
                      java.lang.Object action)
Description copied from interface: CommonBehaviorHelper
Add an action to action sequence.

Specified by:
addAction in interface CommonBehaviorHelper
Parameters:
handle - the action sequence
action - the action

addAction

public void addAction(java.lang.Object handle,
                      int position,
                      java.lang.Object action)
Description copied from interface: CommonBehaviorHelper
Inserts an action at the specified position in an action sequence.

Specified by:
addAction in interface CommonBehaviorHelper
Parameters:
handle - the action sequence
position - the 0-based position at which to insert the action
action - the action

removeAction

public void removeAction(java.lang.Object handle,
                         java.lang.Object action)
Description copied from interface: CommonBehaviorHelper
Remove an Action from an ActionSequence.

Specified by:
removeAction in interface CommonBehaviorHelper
Parameters:
handle - ActionSequence
action - Action


ArgoUML © 1996-2006ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook