Author: thn Date: 2011-02-21 14:36:40-0800 New Revision: 19046 Modified: trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/ExtensionMechanismsHelperMDRImpl.java trunk/src/argouml-core-model/src/org/argouml/model/AbstractExtensionMechanismsHelperDecorator.java trunk/src/argouml-core-model/src/org/argouml/model/ExtensionMechanismsHelper.java
Log: UML2: new method setTaggedValue (needs another parameter) Modified: trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/ExtensionMechanismsHelperMDRImpl.java Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/ExtensionMechanismsHelperMDRImpl.java?view=diff&pathrev=19046&r1=19045&r2=19046 ============================================================================== --- trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/ExtensionMechanismsHelperMDRImpl.java (original) +++ trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/ExtensionMechanismsHelperMDRImpl.java 2011-02-21 14:36:40-0800 @@ -53,6 +53,7 @@ import org.apache.log4j.Logger; import org.argouml.model.ExtensionMechanismsHelper; import org.argouml.model.InvalidElementException; +import org.argouml.model.NotImplementedException; import org.omg.uml.foundation.core.ModelElement; import org.omg.uml.foundation.core.Namespace; import org.omg.uml.foundation.core.Stereotype; @@ -471,6 +472,10 @@ + " or taggedValues: " + taggedValues); } + public void setTaggedValue(Object handle, Object property, Object value) { + throw new NotImplementedException(); + } + public void setTagType(Object handle, String tagType) { if (handle instanceof TagDefinition) { // TODO: What type of validation can we do here on tagType? Modified: trunk/src/argouml-core-model/src/org/argouml/model/AbstractExtensionMechanismsHelperDecorator.java Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-model/src/org/argouml/model/AbstractExtensionMechanismsHelperDecorator.java?view=diff&pathrev=19046&r1=19045&r2=19046 ============================================================================== --- trunk/src/argouml-core-model/src/org/argouml/model/AbstractExtensionMechanismsHelperDecorator.java (original) +++ trunk/src/argouml-core-model/src/org/argouml/model/AbstractExtensionMechanismsHelperDecorator.java 2011-02-21 14:36:40-0800 @@ -165,6 +165,10 @@ impl.setTaggedValue(handle, taggedValues); } + public void setTaggedValue(Object handle, Object property, Object value) { + impl.setTaggedValue(handle, property, value); + } + public boolean hasStereotype(Object handle, String name) { return impl.hasStereotype(handle, name); } Modified: trunk/src/argouml-core-model/src/org/argouml/model/ExtensionMechanismsHelper.java Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-model/src/org/argouml/model/ExtensionMechanismsHelper.java?view=diff&pathrev=19046&r1=19045&r2=19046 ============================================================================== --- trunk/src/argouml-core-model/src/org/argouml/model/ExtensionMechanismsHelper.java (original) +++ trunk/src/argouml-core-model/src/org/argouml/model/ExtensionMechanismsHelper.java 2011-02-21 14:36:40-0800 @@ -255,7 +255,7 @@ void setValueOfTag(Object handle, String value); /** - * Sets the dataValues of the given TaggedValue. + * Sets the dataValues of the given TaggedValue. UML1 only. * * @param handle is the tagged value * @param values an array of String values @@ -289,7 +289,7 @@ void removeTaggedValue(Object handle, Object taggedValue); /** - * Set the list of tagged values for a model element. + * Set the list of tagged values for a model element. UML1 only. * * @param handle The model element to set for. * @param taggedValues A Collection of tagged values. @@ -297,6 +297,17 @@ void setTaggedValue(Object handle, Collection taggedValues); /** + * Set tagged value (bound to a stereotype) for a model element. + * The value might be an List, depending on the multiplicity of the + * property. + * + * @param handle The model element to set for. + * @param property The property of the applied stereotype. + * @param value Single value or a List value to set to. + */ + void setTaggedValue(Object handle, Object property, Object value); + + /** * Unapply a profile to a model or another profile. * * @param handle The model or profile. ------------------------------------------------------ http://argouml.tigris.org/ds/viewMessage.do?dsForumId=5905&dsMessageId=2706351 To unsubscribe from this discussion, e-mail: [[email protected]].
