From d83ed2336315c914ea3716603fdff535a45d1f44 Mon Sep 17 00:00:00 2001 From: jprocter Date: Tue, 24 Jan 2006 19:23:12 +0000 Subject: [PATCH 1/1] introduced org.vamsas.client.IClientAppData interface to get and set app-global and user-specific appdata chunks. git-svn-id: https://svn.lifesci.dundee.ac.uk/svn/repository/trunk@172 be28352e-c001-0410-b1a7-c7978e42abec --- src/org/vamsas/client/IClientAppdata.java | 61 ++++++++++++++++++++++++++++ src/org/vamsas/client/IClientDocument.java | 15 ++----- 2 files changed, 64 insertions(+), 12 deletions(-) create mode 100644 src/org/vamsas/client/IClientAppdata.java diff --git a/src/org/vamsas/client/IClientAppdata.java b/src/org/vamsas/client/IClientAppdata.java new file mode 100644 index 0000000..965a783 --- /dev/null +++ b/src/org/vamsas/client/IClientAppdata.java @@ -0,0 +1,61 @@ +/** + * + */ +package org.vamsas.client; + +import java.io.DataInput; +import java.io.DataOutput; + +/** + * Object for accessing Client and User specific data + * in an IClientDocument instance. + * + */ +public interface IClientAppdata { + /** + * @return true if Client's non-user specific application data is non-zero length. + */ + boolean hasClientAppdata(); + /** + * @return true if User's Client Application data is non-zero length + */ + boolean hasUserAppdata(); + /** + * + * @return byte array containing the Client's non-user specific application data + */ + byte[] getClientAppdata(); + /** + * + * @return byte array containing the Client's user specific application data + */ + byte[] getUserAppdata(); + /** + * set the non-User-specific application data + * @param data - the new non-user-specific data + */ + void setClientAppdata(byte[] data); + /** + * set the User-specific application data + * @param data - the new user-specific data + */ + void setUserAppdata(byte[] data); + /** + * @return non-user specific data output stream + */ + DataOutput getClientOutputStream(); + /** + * @return non-user specific data input stream + */ + DataInput getClientInputStream(); + /** + * + * @return user specific data output stream + */ + DataOutput getUserOutputStream(); + /** + * + * @return user specific data input stream + */ + DataInput getUserInputStream(); +} diff --git a/src/org/vamsas/client/IClientDocument.java b/src/org/vamsas/client/IClientDocument.java index 9983713..84149b6 100644 --- a/src/org/vamsas/client/IClientDocument.java +++ b/src/org/vamsas/client/IClientDocument.java @@ -92,18 +92,9 @@ public interface IClientDocument { * @return array of VorbaIds for the registered objects */ VorbaId[] registerObjects(object[] unregistered); - - /** - * Gets the application data associated with this session's - * vamsas document that is accessible by the client - * application (and user) - * @return applicationData field - */ - byte[] getApplicationData(); /** - * Sets the application data entry associated with - * the application and user participating in this vamsas session. - * @param newData new contents of applicationData field. + * Get instance of Client and User specific vamsas document data access interface. + * @return Interface to Client and user specific application data */ - void setApplicationData(byte[] newData); + IClientAppdata getClientAppdata(); } \ No newline at end of file -- 1.7.10.2