svn commit: r16160 - trunk/src/argouml-app/src/org/argouml: kernel persistence

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: tfmorris
Date: 2008-11-23 22:16:39-0800
New Revision: 16160

Modified:
   trunk/src/argouml-app/src/org/argouml/kernel/Project.java
   trunk/src/argouml-app/src/org/argouml/kernel/ProjectImpl.java
   trunk/src/argouml-app/src/org/argouml/persistence/XmiFilePersister.java

Log:
Remove deprecated Project methods

Modified: trunk/src/argouml-app/src/org/argouml/kernel/Project.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/kernel/Project.java?view=diff&rev=16160&p1=trunk/src/argouml-app/src/org/argouml/kernel/Project.java&p2=trunk/src/argouml-app/src/org/argouml/kernel/Project.java&r1=16159&r2=16160
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/kernel/Project.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/kernel/Project.java	2008-11-23 22:16:39-0800
@@ -27,14 +27,13 @@
 import java.beans.VetoableChangeSupport;
 import java.io.File;
 import java.net.URI;
-import java.net.URISyntaxException;
 import java.util.Collection;
 import java.util.List;
 import java.util.Map;
 import java.util.Vector;
 
-import org.argouml.uml.diagram.ArgoDiagram;
 import org.argouml.profile.Profile;
+import org.argouml.uml.diagram.ArgoDiagram;
 import org.tigris.gef.presentation.Fig;
 
 /**
@@ -52,19 +51,6 @@
  */
 public interface Project {
 
-    /**
-     * Find the base name of this project.<p>
-     *
-     * This is the name minus any valid file extension.
-     *
-     * @return The name (a String).
-     * @deprecated by MVW in V0.25.4 - replaced by 
-     *     {@link org.argouml.persistence.PersistenceManager
-     *     #getProjectBaseName(Project)}
-     *     Rationale: Remove dependency on persistence subsystem.
-     */
-    @Deprecated
-    public String getBaseName();
 
     /**
      * Get the project name. This is just the name part of the full filename.
@@ -72,19 +58,6 @@
      */
     public String getName();
 
-    /**
-     * Set the project URI.
-     *
-     * @param n The new URI (as a String).
-     * @throws URISyntaxException if the argument cannot be converted to
-     *         an URI.
-     * @deprecated by MVW in V0.25.4 - replaced by 
-     *     {@link org.argouml.persistence.PersistenceManager
-     *     #setProjectName(String, Project)}
-     *     Rationale: Remove dependency on persistence subsystem.
-     */
-    @Deprecated
-    public void setName(final String n) throws URISyntaxException;
 
     /**
      * Get the URI for this project.
@@ -94,18 +67,6 @@
     public URI getURI();
 
     /**
-     * Set the URI for this project.
-     *
-     * @param theUri The URI to set.
-     * @deprecated by MVW in V0.25.4 - replaced by 
-     *     {@link org.argouml.persistence.PersistenceManager
-     *     #setProjectURI(URI, Project)}
-     *     Rationale: Remove dependency on persistence subsystem.
-     */
-    @Deprecated
-    public void setURI(final URI theUri);
-
-    /**
      * Set the URI for this project. <p>
      * 
      * Don't use this directly! Use instead:
@@ -125,15 +86,6 @@
      */
     public void setFile(final File file);
 
-    /**
-     * Not used by "argo.tee" any more.
-     * 
-     * @return the search path
-     * @deprecated by tfmorris for 0.25.4.  Use {@link #getSearchPathList()}.
-     */
-    // TODO: Unused?
-    @Deprecated
-    public Vector<String> getSearchPath();
     
     /**
      * Used by "argo.tee".
@@ -397,13 +349,6 @@
     @Deprecated
     public Object getCurrentNamespace();
 
-
-    /**
-     * @return the diagrams
-     * @deprecated for 0.25.4 by tfmorris. Use {@link #getDiagramList()}.
-     */
-    @Deprecated
-    public Vector<ArgoDiagram> getDiagrams();
     
     /**
      * @return the diagrams

Modified: trunk/src/argouml-app/src/org/argouml/kernel/ProjectImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/kernel/ProjectImpl.java?view=diff&rev=16160&p1=trunk/src/argouml-app/src/org/argouml/kernel/ProjectImpl.java&p2=trunk/src/argouml-app/src/org/argouml/kernel/ProjectImpl.java&r1=16159&r2=16160
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/kernel/ProjectImpl.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/kernel/ProjectImpl.java	2008-11-23 22:16:39-0800
@@ -187,16 +187,6 @@
         addSearchPath("PROJECT_DIR");
     }
 
-    /*
-     * @deprecated by MVW in V0.25.4 - replaced by 
-     *     {@link PersistenceManager#getProjectBaseName(Project)}
-     *     Rationale: Remove dependency on persistence subsystem.
-     */
-    @Deprecated
-    public String getBaseName() {
-        return PersistenceManager.getInstance().getProjectBaseName(this);
-    }
-
 
     public String getName() {
         // TODO: maybe separate name
@@ -206,17 +196,6 @@
         return new File(uri).getName();
     }
 
-    /*
-     * @deprecated by MVW in V0.25.4 - replaced by 
-     *     {@link PersistenceManager#setProjectName(String, Project)}
-     *     Rationale: Remove dependency on persistence subsystem.
-     */
-    @Deprecated
-    public void setName(final String n)
-        throws URISyntaxException {
-        PersistenceManager.getInstance().setProjectName(n, this);
-    }
-
 
     public URI getUri() {
         return uri;
@@ -227,16 +206,6 @@
         return uri;
     }
 
-    /*
-     * @deprecated by MVW in V0.25.4 - replaced by 
-     *     {@link PersistenceManager#setProjectUri(URI, Project)}
-     *     Rationale: Remove dependency on persistence subsystem.
-     */
-    @Deprecated
-    public void setURI(URI theUri) {
-        PersistenceManager.getInstance().setProjectURI(theUri, this);
-    }
-
     /**
      * @param theUri the URI for the project
      */
@@ -263,12 +232,6 @@
     }
 
 
-    @SuppressWarnings("deprecation")
-    public Vector<String> getSearchPath() {
-        return new Vector<String>(searchpath);
-    }
-
-
     public List<String> getSearchPathList() {
         return Collections.unmodifiableList(searchpath);
     }
@@ -647,6 +610,7 @@
     }
 
 
+    @Deprecated
     public void setCurrentNamespace(final Object m) {
 
         if (m != null && !Model.getFacade().isANamespace(m)) {
@@ -657,16 +621,11 @@
     }
 
 
+    @Deprecated
     public Object getCurrentNamespace() {
         return currentNamespace;
     }
 
-
-    @SuppressWarnings("deprecation")
-    public Vector<ArgoDiagram> getDiagrams() {
-        return new Vector<ArgoDiagram>(diagrams);
-    }
-
     public List<ArgoDiagram> getDiagramList() {
         return Collections.unmodifiableList(diagrams);
     }

Modified: trunk/src/argouml-app/src/org/argouml/persistence/XmiFilePersister.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/persistence/XmiFilePersister.java?view=diff&rev=16160&p1=trunk/src/argouml-app/src/org/argouml/persistence/XmiFilePersister.java&p2=trunk/src/argouml-app/src/org/argouml/persistence/XmiFilePersister.java&r1=16159&r2=16160
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/persistence/XmiFilePersister.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/persistence/XmiFilePersister.java	2008-11-23 22:16:39-0800
@@ -265,7 +265,8 @@
                 defaultProjectFile =
                         new File(file.getPath() + "." + i + ".zargo");
             }
-            p.setURI(defaultProjectFile.toURI());
+            PersistenceManager.getInstance().setProjectURI(
+                    defaultProjectFile.toURI(), p);
             progressMgr.nextPhase();
             ProjectManager.getManager().setSaveEnabled(false);
             return p;
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.