Author: tfmorris
Date: 2007-12-21 01:28:08-0800
New Revision: 13964
Modified:
trunk/src/model/src/org/argouml/model/AbstractExtensionMechanismsHelperDecorator.java
trunk/src/model/src/org/argouml/model/CommonBehaviorHelper.java
trunk/src/model/src/org/argouml/model/ExtensionMechanismsFactory.java
trunk/src/model/src/org/argouml/model/ExtensionMechanismsHelper.java
trunk/src/model/src/org/argouml/model/Facade.java
Log:
Issue 4953 - Extend tagged value API to support multiple dataValues
Modified: trunk/src/model/src/org/argouml/model/AbstractExtensionMechanismsHelperDecorator.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/model/src/org/argouml/model/AbstractExtensionMechanismsHelperDecorator.java?view=diff&rev=13964&p1=trunk/src/model/src/org/argouml/model/AbstractExtensionMechanismsHelperDecorator.java&p2=trunk/src/model/src/org/argouml/model/AbstractExtensionMechanismsHelperDecorator.java&r1=13963&r2=13964
==============================================================================
--- trunk/src/model/src/org/argouml/model/AbstractExtensionMechanismsHelperDecorator.java (original)
+++ trunk/src/model/src/org/argouml/model/AbstractExtensionMechanismsHelperDecorator.java 2007-12-21 01:28:08-0800
@@ -138,10 +138,15 @@
impl.setType(handle, type);
}
+ @Deprecated
public void setValueOfTag(Object handle, String value) {
impl.setValueOfTag(handle, value);
}
+ public void setDataValues(Object handle, String[] values) {
+ impl.setDataValues(handle, values);
+ }
+
public void addTaggedValue(Object handle, Object taggedValue) {
impl.addTaggedValue(handle, taggedValue);
}
Modified: trunk/src/model/src/org/argouml/model/CommonBehaviorHelper.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/model/src/org/argouml/model/CommonBehaviorHelper.java?view=diff&rev=13964&p1=trunk/src/model/src/org/argouml/model/CommonBehaviorHelper.java&p2=trunk/src/model/src/org/argouml/model/CommonBehaviorHelper.java&r1=13963&r2=13964
==============================================================================
--- trunk/src/model/src/org/argouml/model/CommonBehaviorHelper.java (original)
+++ trunk/src/model/src/org/argouml/model/CommonBehaviorHelper.java 2007-12-21 01:28:08-0800
@@ -26,7 +26,6 @@
import java.util.Collection;
import java.util.List;
-import java.util.Vector;
/**
@@ -288,10 +287,15 @@
void setTransition(Object handle, Object trans);
/**
- * Set the value of a given object.
- *
+ * Set the value of an Argument or AttributeLink.
+ * <p>
+ * <em>NOTE:</em> This method used allow setting the dataValue of a
+ * TaggedValue. This usage is deprecated.
+ *
* @param handle the Object of which the value will be set
- * @param value Object
+ * @param 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.
*/
void setValue(Object handle, Object value);
Modified: trunk/src/model/src/org/argouml/model/ExtensionMechanismsFactory.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/model/src/org/argouml/model/ExtensionMechanismsFactory.java?view=diff&rev=13964&p1=trunk/src/model/src/org/argouml/model/ExtensionMechanismsFactory.java&p2=trunk/src/model/src/org/argouml/model/ExtensionMechanismsFactory.java&r1=13963&r2=13964
==============================================================================
--- trunk/src/model/src/org/argouml/model/ExtensionMechanismsFactory.java (original)
+++ trunk/src/model/src/org/argouml/model/ExtensionMechanismsFactory.java 2007-12-21 01:28:08-0800
@@ -89,14 +89,26 @@
/**
* Build an initialized instance of a UML TaggedValue.
- *
+ *
* @param tag is the tag name (a String).
- * @param value is the value (a String).
+ * @param value a String to use as the dataValue
* @return an initialized UML TaggedValue instance.
+ * @deprecated for 0.25.5 by tfmorris. Use
+ * {@link #buildTaggedValue(Object, String[])}.
*/
+ @Deprecated
Object buildTaggedValue(String tag, String value);
/**
+ * Build an initialized instance of a UML TaggedValue.
+ *
+ * @param type TagDefinition which defines the type of the TaggedValue
+ * @param values is an array of Strings to be used as the dataValues.
+ * @return an initialized UML TaggedValue instance.
+ */
+ Object buildTaggedValue(Object type, String[] values);
+
+ /**
* Copy tagged value collection from one model element to another. New
* copies are created of the tagged values themselves and of the dataValues
* they contain, but not of the referenced type or reference values.
Modified: trunk/src/model/src/org/argouml/model/ExtensionMechanismsHelper.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/model/src/org/argouml/model/ExtensionMechanismsHelper.java?view=diff&rev=13964&p1=trunk/src/model/src/org/argouml/model/ExtensionMechanismsHelper.java&p2=trunk/src/model/src/org/argouml/model/ExtensionMechanismsHelper.java&r1=13963&r2=13964
==============================================================================
--- trunk/src/model/src/org/argouml/model/ExtensionMechanismsHelper.java (original)
+++ trunk/src/model/src/org/argouml/model/ExtensionMechanismsHelper.java 2007-12-21 01:28:08-0800
@@ -225,13 +225,28 @@
void setType(Object handle, Object type);
/**
- * Sets a value of some taggedValue.
- *
- * @param handle is the tagged value
- * @param value is the value
+ * 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.
+ *
+ * @param handle
+ * is the tagged value
+ * @param value
+ * is the value
+ * @deprecated for 0.25.5 by tfmorris. Use
+ * {@link #setDataValues(Object, String[])}.
*/
+ @Deprecated
void setValueOfTag(Object handle, String value);
+ /**
+ * Sets the dataValues of the given TaggedValue.
+ *
+ * @param handle is the tagged value
+ * @param values an array of String values
+ */
+ void setDataValues(Object handle, String[] values);
+
//additional support for tagged values
/**
Modified: trunk/src/model/src/org/argouml/model/Facade.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/model/src/org/argouml/model/Facade.java?view=diff&rev=13964&p1=trunk/src/model/src/org/argouml/model/Facade.java&p2=trunk/src/model/src/org/argouml/model/Facade.java&r1=13963&r2=13964
==============================================================================
--- trunk/src/model/src/org/argouml/model/Facade.java (original)
+++ trunk/src/model/src/org/argouml/model/Facade.java 2007-12-21 01:28:08-0800
@@ -3352,7 +3352,7 @@
boolean isATagDefinition(Object handle);
/**
- * Return the TagDefinitions for a StereoType.
+ * Return the TagDefinitions owned by the given Stereotype.
*
* @param handle Stereotype to fetch TagDefinitions for
* @return collection of TagDefinitions
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.