|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.argouml.model.uml.CollaborationsHelperImpl
Helper class for UML BehavioralElements::Collaborations Package. Current implementation is a placeholder.
Field Summary | |
private NSUMLModelImplementation |
nsmodel
The model implementation. |
Constructor Summary | |
(package private) |
CollaborationsHelperImpl(NSUMLModelImplementation implementation)
Don't allow instantiation. |
Method Summary | |
void |
addBase(Object arole,
Object abase)
Adds a base to the given classifierrole. |
void |
addConstrainingElement(Object handle,
Object constraint)
Add a constraining element. |
void |
addInstance(Object classifierRole,
Object instance)
Adds an instance to a classifier role. |
void |
addMessage(Object handle,
Object elem)
Add a message to an interaction or association role. |
void |
addMessage3(Object handle,
Object mess)
Add Message to a predecessor Message. |
void |
addPredecessor(Object handle,
Object predecessor)
Adds a predecessor to a message. |
Collection |
allAvailableContents(Object arole)
Returns all available contents for a given classifierrole as defined in section 2.10.3.3 of the UML 1.3 spec. |
Collection |
allAvailableFeatures(Object arole)
Returns all available features for a given classifierrole as defined in section 2.10.3.3 of the UML 1.3 spec. |
Collection |
getAllClassifierRoles(Object ns)
Returns all classifierroles found in this namespace and in its children. |
Collection |
getAllPossibleActivators(Object ames)
Returns all possible activators for some message mes. |
Collection |
getAllPossibleAssociationRoles(Object roleArg)
Returns all associations the bases of the classifierrole has, thereby forming the set of associationroles the classifierrole can use. |
private Collection |
getAllPossibleBases(ru.novosoft.uml.behavior.collaborations.MAssociationRole role)
Returns all possible bases for some AssociationRole taking into account the wellformednessrules as defined in section 2.10.3 of the UML 1.3 spec. |
private Collection |
getAllPossibleBases(ru.novosoft.uml.behavior.collaborations.MClassifierRole role)
Returns all possible bases for some classifierrole taking into account the wellformednessrules as defined in section 2.10.3 of the UML 1.3 spec. |
Collection |
getAllPossibleBases(Object role)
|
Collection |
getAllPossiblePredecessors(Object amessage)
Returns all possible predecessors for some message, taking into account the wellformednessrules as defined in section 2.10 of the UML spec. |
Object |
getAssocationRole(Object afrom,
Object ato)
Returns the first found associationrole between two classifierroles. |
Collection |
getClassifierRoles(Object role)
Returns all classifierroles associated via associationroles to some classifierrole role. |
boolean |
hasAsActivator(Object message,
Object activator)
Returns true if the given message has the message activator somewhere as it's activator. |
boolean |
isAddingCollaborationAllowed(Object context)
Returns true if a collaboration may be added to the given context. |
void |
removeBase(Object handle,
Object c)
This method removes a classifier from a classifier role. |
void |
removeConstrainingElement(Object handle,
Object constraint)
Remove a constraining element. |
void |
removeMessage(Object handle,
Object message)
Removes a message from the interaction or association role. |
void |
removeMessage3(Object handle,
Object mess)
Removes a successor message. |
void |
removePredecessor(Object handle,
Object message)
Removes a predecessor message. |
void |
setAction(Object handle,
Object action)
Sets the action to a message. |
void |
setActivator(Object ames,
Object anactivator)
Sets the activator of some given message mes. |
void |
setBase(Object arole,
Object abase)
|
void |
setBases(Object role,
Collection bases)
Sets the bases of the given classifierrole to the given collection bases. |
void |
setContext(Object handle,
Object col)
Set the context of an interaction. |
void |
setMessages3(Object handle,
Collection messages)
|
void |
setPredecessors(Object handle,
Collection predecessors)
Set the collection of predecessing messages. |
void |
setRepresentedClassifier(Object handle,
Object classifier)
Sets the represented classifier of some collaboration. |
void |
setRepresentedOperation(Object handle,
Object operation)
Sets the represented operation of some collaboration. |
void |
setSender(Object handle,
Object sender)
Sets the sender of some model element. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private NSUMLModelImplementation nsmodel
Constructor Detail |
CollaborationsHelperImpl(NSUMLModelImplementation implementation)
implementation
- To get other helpers and factories.Method Detail |
public Collection getAllClassifierRoles(Object ns)
getAllClassifierRoles
in interface org.argouml.model.CollaborationsHelper
ns
- the namespace
public Collection getAllPossibleAssociationRoles(Object roleArg)
getAllPossibleAssociationRoles
in interface org.argouml.model.CollaborationsHelper
roleArg
- the classifierrole
public Collection getClassifierRoles(Object role)
getClassifierRoles
in interface org.argouml.model.CollaborationsHelper
role
- the classifierrole
public Object getAssocationRole(Object afrom, Object ato)
getAssocationRole
in interface org.argouml.model.CollaborationsHelper
afrom
- the first classifierroleato
- the second classifierrole
public Collection getAllPossibleActivators(Object ames)
getAllPossibleActivators
in interface org.argouml.model.CollaborationsHelper
ames
- the message
public boolean hasAsActivator(Object message, Object activator)
hasAsActivator
in interface org.argouml.model.CollaborationsHelper
message
- the given messageactivator
- the given activator
public void setActivator(Object ames, Object anactivator)
setActivator
in interface org.argouml.model.CollaborationsHelper
ames
- the given messageanactivator
- the given activatorpublic Collection getAllPossiblePredecessors(Object amessage)
getAllPossiblePredecessors
in interface org.argouml.model.CollaborationsHelper
amessage
- the given message
public void addBase(Object arole, Object abase)
addBase
in interface org.argouml.model.CollaborationsHelper
arole
- the given classifierroleabase
- the base to be addedpublic void setBases(Object role, Collection bases)
setBases
in interface org.argouml.model.CollaborationsHelper
role
- the given classifierrolebases
- the given collection of basespublic Collection allAvailableFeatures(Object arole)
allAvailableFeatures
in interface org.argouml.model.CollaborationsHelper
arole
- the given classifierrole
public Collection allAvailableContents(Object arole)
allAvailableContents
in interface org.argouml.model.CollaborationsHelper
arole
- the given classifierrole
public Collection getAllPossibleBases(Object role)
getAllPossibleBases
in interface org.argouml.model.CollaborationsHelper
role
- the given classifierrole or associationrole
private Collection getAllPossibleBases(ru.novosoft.uml.behavior.collaborations.MAssociationRole role)
role
- the given associationrole
private Collection getAllPossibleBases(ru.novosoft.uml.behavior.collaborations.MClassifierRole role)
role
- the given classifierrole
public void setBase(Object arole, Object abase)
setBase
in interface org.argouml.model.CollaborationsHelper
CollaborationsHelper.setBase(
java.lang.Object, java.lang.Object)
public boolean isAddingCollaborationAllowed(Object context)
TODO: MVW: Removed the MCollaboration and MModel. Why were they included in the test below?
- MCollaboration: this allows a 2nd diagram for the same collaboration. According to my interpretation of the UML spec, this is not alowed; a collaboration diagram maps on a collaboration.
- MModel: this allowed a collaboration diagram without a represented classifier/operation. But there is no way to correct this later...
isAddingCollaborationAllowed
in interface org.argouml.model.CollaborationsHelper
context
- the given context
public void removeBase(Object handle, Object c)
removeBase
in interface org.argouml.model.CollaborationsHelper
handle
- is the classifier rolec
- is the classifierpublic void removeConstrainingElement(Object handle, Object constraint)
removeConstrainingElement
in interface org.argouml.model.CollaborationsHelper
handle
- The collaboration to remove a constraint to.constraint
- The constraint to remove.public void removeMessage(Object handle, Object message)
removeMessage
in interface org.argouml.model.CollaborationsHelper
handle
- The interaction or association role to remove the
message from.message
- The message to remove.public void removeMessage3(Object handle, Object mess)
removeMessage3
in interface org.argouml.model.CollaborationsHelper
handle
- the Message that needs to loose a successormess
- the Message that is removedpublic void removePredecessor(Object handle, Object message)
removePredecessor
in interface org.argouml.model.CollaborationsHelper
handle
- the Message that needs to loose a predecessormessage
- the Message that is removedpublic void addConstrainingElement(Object handle, Object constraint)
addConstrainingElement
in interface org.argouml.model.CollaborationsHelper
handle
- The collaboration to add a constraint to.constraint
- The constraint to add.public void addInstance(Object classifierRole, Object instance)
addInstance
in interface org.argouml.model.CollaborationsHelper
classifierRole
- is the classifier roleinstance
- is the instance to addpublic void addMessage(Object handle, Object elem)
addMessage
in interface org.argouml.model.CollaborationsHelper
handle
- The interaction or association role.elem
- The message.public void addMessage3(Object handle, Object mess)
addMessage3
in interface org.argouml.model.CollaborationsHelper
handle
- predecessor Messagemess
- Message to be addedpublic void addPredecessor(Object handle, Object predecessor)
addPredecessor
in interface org.argouml.model.CollaborationsHelper
handle
- the messagepredecessor
- is the predecessorpublic void setAction(Object handle, Object action)
setAction
in interface org.argouml.model.CollaborationsHelper
handle
- is the messageaction
- is the actionpublic void setContext(Object handle, Object col)
setContext
in interface org.argouml.model.CollaborationsHelper
handle
- The element.col
- The context to set.public void setMessages3(Object handle, Collection messages)
setMessages3
in interface org.argouml.model.CollaborationsHelper
handle
- Messagemessages
- Collection of predecessor messagespublic void setPredecessors(Object handle, Collection predecessors)
setPredecessors
in interface org.argouml.model.CollaborationsHelper
handle
- Messagepredecessors
- Collection of Messagespublic void setRepresentedClassifier(Object handle, Object classifier)
setRepresentedClassifier
in interface org.argouml.model.CollaborationsHelper
handle
- the collaborationclassifier
- is the classifier or nullpublic void setRepresentedOperation(Object handle, Object operation)
setRepresentedOperation
in interface org.argouml.model.CollaborationsHelper
handle
- the collaborationoperation
- is the operation or nullpublic void setSender(Object handle, Object sender)
setSender
in interface org.argouml.model.CollaborationsHelper
handle
- model elementsender
- the sender
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ArgoUML © 1996-2004 (20050222) | ArgoUML Homepage | ArgoUML Developers' page | ArgoUML Cookbook |