svn commit: r14410 - trunk/src/argouml-core-model/src/org/argouml/model/UmlFactory.java

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: bobtarling
Date: 2008-04-19 16:59:57-0700
New Revision: 14410

Modified:
   trunk/src/argouml-core-model/src/org/argouml/model/UmlFactory.java

Log:
Scott Roberts patch to create model elements from explorer context http://argouml.tigris.org/issues/show_bug.cgi?id=1009

Modified: trunk/src/argouml-core-model/src/org/argouml/model/UmlFactory.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-model/src/org/argouml/model/UmlFactory.java?view=diff&rev=14410&p1=trunk/src/argouml-core-model/src/org/argouml/model/UmlFactory.java&p2=trunk/src/argouml-core-model/src/org/argouml/model/UmlFactory.java&r1=14409&r2=14410
==============================================================================
--- trunk/src/argouml-core-model/src/org/argouml/model/UmlFactory.java	(original)
+++ trunk/src/argouml-core-model/src/org/argouml/model/UmlFactory.java	2008-04-19 16:59:57-0700
@@ -53,7 +53,7 @@
     Object buildConnection(Object connectionType, Object fromElement,
             Object fromStyle, Object toElement, Object toStyle,
             Object unidirectional, Object namespace)
-    	throws IllegalModelElementConnectionException;
+        throws IllegalModelElementConnectionException;
 
     /**
      * Creates a UML model element of the given type.
@@ -67,6 +67,17 @@
      * @return the model element
      */
     Object buildNode(Object elementType);
+    
+    /**
+     * Creates a UML model element of the given type and adds 
+     * it to the passed in container.
+     * 
+     * @param elementType the type of model element to build
+     * @param container the model element that will contain the 
+     * newly built model element
+     * @return the model element
+     */
+    Object buildNode(Object elementType, Object container);
 
     /**
      * Checks if some type of UML model element is valid to
@@ -114,6 +125,16 @@
             Object toElement, boolean checkWFR);
     
     /**
+     * Checks if the given type of UML model element is valid to be
+     * contained within the passed in container model element. 
+     * 
+     * @param metaType the UML object type to be tested
+     * @param container the UML object that is the container
+     * @return true if valid
+     */
+    boolean isContainmentValid(Object metaType, Object container);
+    
+    /**
      * Delete a model element. This will do a a 'cascading deletes' 
      * which recursively deletes any model elements which would no
      * longer be valid after this element is deleted. For example, a binary
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.