finished the Appdata/ClientDocument update mechanism. Untested!
[vamsas.git] / src / org / vamsas / client / simpleclient / VamsasSession.java
index 4e6f430..365311d 100644 (file)
@@ -278,7 +278,7 @@ public class VamsasSession {
   }
   
   /**
-   * Creates a VamsasArchive object for accessing and updating document
+   * Creates a VamsasArchive Vobject for accessing and updating document
    * Note: this will lock the Vamsas Document for exclusive access to the client.
    * @return session vamsas document
    * @throws IOException if locks fail or vamsas document read fails.
@@ -292,7 +292,19 @@ public class VamsasSession {
     
     return va;
   }
-  
+  /**
+   * create a uniquely named file in the session Directory
+   * @see java.io.File.createTempFile
+   * @param pref Prefix for name
+   * @param suff Suffix for name
+   * @return SessionFile object configured for the new file (of length zero)
+   * @throws IOException
+   */
+  protected SessionFile getTempSessionFile(String pref, String suff) throws IOException {
+    File tfile = File.createTempFile(pref,suff,sessionDir);
+    SessionFile tempFile = new SessionFile(tfile);
+    return tempFile;
+  }
 }