org.argouml.model
Interface ExtensionMechanismsHelper

All Known Implementing Classes:
AbstractExtensionMechanismsHelperDecorator

public interface ExtensionMechanismsHelper

The interface for the helper of the ExtensionMechanisms.


Method Summary
 void addBaseClass(java.lang.Object handle, java.lang.Object baseClass)
          Add a baseclass to some stereotype.
 void addCopyStereotype(java.lang.Object modelElement, java.lang.Object stereotype)
          Sets the stereotype of some modelelement.
 void addExtendedElement(java.lang.Object handle, java.lang.Object extendedElement)
          Add an extended element to a stereotype.
 void addTaggedValue(java.lang.Object handle, java.lang.Object taggedValue)
          Add a tagged value.
 java.util.Collection getAllPossibleStereotypes(java.util.Collection models, java.lang.Object modelElement)
          Returns all possible stereotypes for some modelelement.
 java.lang.String getMetaModelName(java.lang.Object m)
           
 java.lang.Object getStereotype(java.util.Collection models, java.lang.Object stereo)
          Searches for a stereotype just like the given stereotype in all given models.
 java.lang.Object getStereotype(java.lang.Object ns, java.lang.Object stereo)
          Finds a stereotype in some namespace, but not in its subnamespaces.
 java.util.Collection getStereotypes(java.util.Collection models)
          Get all stereotypes from all Models in the list.
 java.util.Collection getStereotypes(java.lang.Object ns)
          Returns all stereotypes in a namespace, but not those in a subnamespace.
 boolean hasStereotype(java.lang.Object element, java.lang.String name)
          Returns true if the given ModelElement has a Stereotype with the given name.
 boolean hasStereoType(java.lang.Object handle, java.lang.String name)
          Deprecated. for 0.25.4 by tfmorris. Use hasStereotype(Object,String) instead
 boolean isStereotype(java.lang.Object object, java.lang.String name, java.lang.String base)
          Tests if a stereotype is a stereotype with some name and base class.
 boolean isStereotypeInh(java.lang.Object object, java.lang.String name, java.lang.String base)
          Tests if a stereotype is or inherits from a stereotype with some name and base class.
 boolean isValidStereotype(java.lang.Object theModelElement, java.lang.Object theStereotype)
          Returns true if the given stereotype has a baseclass that equals the baseclass of the given ModelElement or one of the superclasses of the given ModelElement.
 boolean isValidStereoType(java.lang.Object theModelElement, java.lang.Object theStereotype)
          Deprecated. Deprecated for 0.25.4 by tfmorris. Use isValidStereotype(Object,Object) instead (note different capitalization),
 void removeBaseClass(java.lang.Object handle, java.lang.Object baseClass)
          Remove baseclass from some stereotype.
 void removeTaggedValue(java.lang.Object handle, java.lang.Object taggedValue)
          Remove a tagged value.
 void setDataValues(java.lang.Object handle, java.lang.String[] values)
          Sets the dataValues of the given TaggedValue.
 void setIcon(java.lang.Object handle, java.lang.Object icon)
          Set the icon for a stereotype.
 void setTaggedValue(java.lang.Object handle, java.util.Collection taggedValues)
          Set the list of tagged values for a model element.
 void setTagType(java.lang.Object handle, java.lang.String tagType)
          Set the tagType of a TaggedDefinition.
 void setType(java.lang.Object handle, java.lang.Object type)
          Set the type of a taggedvalue.
 void setValueOfTag(java.lang.Object handle, java.lang.String value)
          Deprecated. for 0.25.5 by tfmorris. Use setDataValues(Object, String[]).
 

Method Detail

getStereotypes

java.util.Collection getStereotypes(java.lang.Object ns)
Returns all stereotypes in a namespace, but not those in a subnamespace.

Parameters:
ns - is the namespace.
Returns:
a Collection with the stereotypes.

getStereotype

java.lang.Object getStereotype(java.lang.Object ns,
                               java.lang.Object stereo)
Finds a stereotype in some namespace, but not in its subnamespaces. Returns null if no such stereotype is found. TODO: What if stereo.getName() or stereo.getBaseClass() is null? Then you know immediately that none will be found, but is that the correct answer?

Parameters:
ns - is the namespace.
stereo - is the stereotype.
Returns:
the stereotype found or null.

getStereotype

java.lang.Object getStereotype(java.util.Collection models,
                               java.lang.Object stereo)
Searches for a stereotype just like the given stereotype in all given models. The given stereotype can not have its namespace set yet; otherwise it will be returned itself! TODO: Should it only search for stereotypes owned by the Model object?

Parameters:
models - a collection of models
stereo - is the given stereotype
Returns:
Stereotype

getMetaModelName

java.lang.String getMetaModelName(java.lang.Object m)
Parameters:
m - the ModelElement
Returns:
the meta name of the ModelElement

getAllPossibleStereotypes

java.util.Collection getAllPossibleStereotypes(java.util.Collection models,
                                               java.lang.Object modelElement)
Returns all possible stereotypes for some modelelement. Possible stereotypes are those stereotypes that are owned by the same namespace the modelelement is owned by and that have a baseclass that is the same as the metamodelelement name of the modelelement.

Parameters:
modelElement - is the model element
models - the models to search in
Returns:
Collection

isValidStereoType

boolean isValidStereoType(java.lang.Object theModelElement,
                          java.lang.Object theStereotype)
Deprecated. Deprecated for 0.25.4 by tfmorris. Use isValidStereotype(Object,Object) instead (note different capitalization),

Returns true if the given stereotype has a baseclass that equals the baseclass of the given modelelement or one of the superclasses of the given modelelement.

Parameters:
theModelElement - is the model element
theStereotype - is the stereotype
Returns:
boolean

isValidStereotype

boolean isValidStereotype(java.lang.Object theModelElement,
                          java.lang.Object theStereotype)
Returns true if the given stereotype has a baseclass that equals the baseclass of the given ModelElement or one of the superclasses of the given ModelElement.

Parameters:
theModelElement - is the model element
theStereotype - is the stereotype
Returns:
boolean

getStereotypes

java.util.Collection getStereotypes(java.util.Collection models)
Get all stereotypes from all Models in the list. Finds only stereotypes owned by the Model objects themselves.

Parameters:
models - the models to search
Returns:
the collection of stereotypes in all models in the current project

addCopyStereotype

void addCopyStereotype(java.lang.Object modelElement,
                       java.lang.Object stereotype)
Sets the stereotype of some modelelement. The method also copies a stereotype that is not a part of the current model to the current model.

Parameters:
modelElement - is the model element
stereotype - is the stereotype

isStereotype

boolean isStereotype(java.lang.Object object,
                     java.lang.String name,
                     java.lang.String base)
Tests if a stereotype is a stereotype with some name and base class.

Parameters:
object - is the stereotype.
name - is the name of the stereotype.
base - is the base class of the stereotype.
Returns:
true if object is a stereotype with the desired characteristics.

isStereotypeInh

boolean isStereotypeInh(java.lang.Object object,
                        java.lang.String name,
                        java.lang.String base)
Tests if a stereotype is or inherits from a stereotype with some name and base class.

Parameters:
object - is the stereotype.
name - is the name of the stereotype.
base - is the base class of the stereotype.
Returns:
true if object is a (descendant of a) stereotype with the desired characteristics.

addExtendedElement

void addExtendedElement(java.lang.Object handle,
                        java.lang.Object extendedElement)
Add an extended element to a stereotype.

Parameters:
handle - Stereotype
extendedElement - ExtensionPoint

addBaseClass

void addBaseClass(java.lang.Object handle,
                  java.lang.Object baseClass)
Add a baseclass to some stereotype.

Parameters:
handle - the stereotype
baseClass - the baseclass to add

removeBaseClass

void removeBaseClass(java.lang.Object handle,
                     java.lang.Object baseClass)
Remove baseclass from some stereotype.

Parameters:
handle - the stereotype
baseClass - the baseclass to remove

setIcon

void setIcon(java.lang.Object handle,
             java.lang.Object icon)
Set the icon for a stereotype.

Parameters:
handle - Stereotype
icon - String

setTagType

void setTagType(java.lang.Object handle,
                java.lang.String tagType)
Set the tagType of a TaggedDefinition. This controls the range of legal values for the associated TaggedValues.

Parameters:
handle - the taggedValue
tagType - A string containing the name of the type for values that may be assigned to this tag. This can either be the name of a datatype (e.g. "String", "Integer" or "Boolean") or the name of a metaclass for more complex types of tagged values.

setType

void setType(java.lang.Object handle,
             java.lang.Object type)
Set the type of a taggedvalue.

Parameters:
handle - the taggedValue
type - the tagDefinition

setValueOfTag

@Deprecated
void setValueOfTag(java.lang.Object handle,
                              java.lang.String value)
Deprecated. for 0.25.5 by tfmorris. Use setDataValues(Object, String[]).

Sets the dataValues of the given TaggedValue to a single String value. Provided for backward compatibility with UML 1.3. new uses should use setDataValues.

Parameters:
handle - is the tagged value
value - is the value

setDataValues

void setDataValues(java.lang.Object handle,
                   java.lang.String[] values)
Sets the dataValues of the given TaggedValue.

Parameters:
handle - is the tagged value
values - an array of String values

addTaggedValue

void addTaggedValue(java.lang.Object handle,
                    java.lang.Object taggedValue)
Add a tagged value.

Parameters:
handle - The model element to add to.
taggedValue - The tagged value to add.

removeTaggedValue

void removeTaggedValue(java.lang.Object handle,
                       java.lang.Object taggedValue)
Remove a tagged value.

Parameters:
handle - The model element to remove from.
taggedValue - The tagged value to remove.

setTaggedValue

void setTaggedValue(java.lang.Object handle,
                    java.util.Collection taggedValues)
Set the list of tagged values for a model element.

Parameters:
handle - The model element to set for.
taggedValues - A Collection of tagged values.

hasStereoType

boolean hasStereoType(java.lang.Object handle,
                      java.lang.String name)
Deprecated. for 0.25.4 by tfmorris. Use hasStereotype(Object,String) instead

Returns true if the given object has a stereotype with the given name.

Parameters:
handle - the given object
name - the given name
Returns:
true if there is such a stereotype

hasStereotype

boolean hasStereotype(java.lang.Object element,
                      java.lang.String name)
Returns true if the given ModelElement has a Stereotype with the given name.

Parameters:
element - the given element
name - the given name
Returns:
true if there is such a stereotype


ArgoUML © 1996-2006ArgoUML HomepageArgoUML Cookbook