001: /* ----- BEGIN LICENSE BLOCK -----
002: * Version: MPL 1.1
003: *
004: * The contents of this file are subject to the Mozilla Public License Version
005: * 1.1 (the "License"); you may not use this file except in compliance with
006: * the License. You may obtain a copy of the License at
007: * http://www.mozilla.org/MPL/
008: *
009: * Software distributed under the License is distributed on an "AS IS" basis,
010: * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
011: * for the specific language governing rights and limitations under the
012: * License.
013: *
014: * The Original Code is the DataShare server.
015: *
016: * The Initial Developer of the Original Code is
017: * Ball Aerospace & Technologies Corp, Fairborn, Ohio
018: * Portions created by the Initial Developer are Copyright (C) 2001
019: * the Initial Developer. All Rights Reserved.
020: *
021: * Contributor(s): Charles Wood <cwood@ball.com>
022: *
023: * ----- END LICENSE BLOCK ----- */
024: /* RCS $Id: DSObjectInfoInterface.java,v 1.1.1.1 2001/10/23 13:37:19 lizellaman Exp $
025: * $Log: DSObjectInfoInterface.java,v $
026: * Revision 1.1.1.1 2001/10/23 13:37:19 lizellaman
027: * initial sourceforge release
028: *
029: */
030:
031: package org.datashare.objects;
032:
033: import java.util.Date;
034:
035: /**
036: * This interface is intended to allow for common handling of Sessions, Clients,
037: * Channels, etc. All objects in the Session Tree must implement this interface.
038: *
039: * @author Charles Wood
040: * @version 1.0
041: */
042: public interface DSObjectInfoInterface {
043: /**
044: * should be returned by getOriginalType() if this instance represents a ChannelInfo instance
045: *
046: */
047: static String CHANNELTYPE = "ChannelInfo";
048:
049: /**
050: * should be returned by getOriginalType() if this instance represents a ClientInfo instance
051: *
052: */
053: static String CLIENTTYPE = "ClientInfo";
054:
055: /**
056: * should be returned by getOriginalType() if this instance represents an unknown instance
057: *
058: */
059: static String DEFAULTOBJECTTYPE = "DefaultObjectInfo";
060:
061: /**
062: * should be returned by getOriginalType() if this instance represents a SessionInfo instance
063: *
064: */
065: static String SESSIONTYPE = "SessionInfo";
066:
067: /**
068: * should be returned by getOriginalType() if this instance represents a ConsumerInfo instance
069: *
070: */
071: static String CONSUMERTYPE = "ConsumerInfo";
072:
073: static String SUBSESSIONTYPE = "SubSession";
074: static String SUBCLIENTTYPE = "SubClient";
075:
076: static String COLLABORANTS = "Collaborants";
077: static String COLLABORATION = "Collaboration";
078: static String ALLSESSIONS = "All Sessions";
079: static String ARCHIVES = "Closed Sessions";
080:
081: /**
082: * Retrieves the name of this instance.
083: *
084: * @return the instance's name
085: */
086: String getName();
087:
088: /**
089: * Retrieves the Creator/Owner name for this instance, used only for Sessions and Channels
090: *
091: * @return this instance's owner/creator name
092: */
093: String getOwnerName();
094:
095: /**
096: * name of this object, used to distinguish this instance from other instances
097: * of the same object/type
098: *
099: * @return name of this instance
100: */
101: String toString();
102:
103: /**
104: * class name of this object, used to do casting of Object returned by getObject
105: *
106: * @return type that was saved for this instance
107: */
108: String getType();
109:
110: /**
111: * class name of the type this instance is representing. This is typically used
112: * when a parent class is used to represent a sublclass to allow for serialization
113: * of the class.
114: *
115: * @return the type this instance was created to represent
116: */
117: String getOriginalType();
118:
119: /**
120: * reference to this object as an Object
121: *
122: * @return the object
123: */
124: Object getObject();
125:
126: /**
127: * detailed info about object, for display purposes
128: *
129: * @return description for this instance
130: */
131: String getInfo();
132:
133: /**
134: * when this instance was created
135: *
136: * @return time this instance was created
137: */
138: Date getDate();
139:
140: /**
141: * indicates if this object is currently active in a JSDT Registry
142: *
143: * @return true if currently active in a JSDT Registry
144: */
145: boolean getActive();
146:
147: /**
148: * used when a Hashtable needs a key for this instance. Should be unique for
149: * all instances of the type.
150: *
151: * @return the recommended key value to use in Hashtables for this instance
152: */
153: String getKeyValue();
154:
155: /**
156: * used when an EJB for this class is created as a place to store the ADSKey String for
157: * this instance.
158: *
159: * @return the ADSKey String for this instance
160: */
161: String getDatabaseID();
162:
163: /**
164: * used when an EJB for this class has been created and we want store the ADSKey String for
165: * this instance.
166: *
167: * @param databaseID the string that could be used to retrieve the EJB for this
168: * instance
169: */
170: void setDatabaseID(String databaseID);
171:
172: /**
173: * returns the URL for the image of a user, probably valid only if this instance refers to a Client/Consumer
174: */
175: String getImageURL();
176: }
|