*/
package uk.ac.vamsas.client;
+import java.io.File;
+
/**
* Defines methods for instantiating Vorba client application agents
* @author jimp
* @return
*/
IClient getNewSessionIClient(ClientHandle applicationHandle, UserHandle userId);
-
+ /**
+ * Create a new session and import an existing vamsas document into it.
+ * @param applicationHandle
+ * @param vamsasDocument
+ * @return
+ */
+ IClient openAsNewSessionIClient(ClientHandle applicationHandle, File vamsasDocument) throws InvalidSessionDocumentException;
+ /**
+ * Create a new session as a particular user and import an existing vamsas document into it.
+ * @param applicationHandle
+ * @param userId
+ * @param vamsasDocument
+ * @return
+ */
+ IClient openAsNewSessionIClient(ClientHandle applicationHandle, UserHandle userId, File vamsasDocument) throws InvalidSessionDocumentException;
/**
* enumerate the active sessions this IClientFactory instance knows about.
* Can be used by caller to pick a session on catching a NoDefaultSessionException.