KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > datashare > objects > DSObjectInfoInterface


1 /* ----- BEGIN LICENSE BLOCK -----
2  * Version: MPL 1.1
3  *
4  * The contents of this file are subject to the Mozilla Public License Version
5  * 1.1 (the "License"); you may not use this file except in compliance with
6  * the License. You may obtain a copy of the License at
7  * http://www.mozilla.org/MPL/
8  *
9  * Software distributed under the License is distributed on an "AS IS" basis,
10  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11  * for the specific language governing rights and limitations under the
12  * License.
13  *
14  * The Original Code is the DataShare server.
15  *
16  * The Initial Developer of the Original Code is
17  * Ball Aerospace & Technologies Corp, Fairborn, Ohio
18  * Portions created by the Initial Developer are Copyright (C) 2001
19  * the Initial Developer. All Rights Reserved.
20  *
21  * Contributor(s): Charles Wood <cwood@ball.com>
22  *
23  * ----- END LICENSE BLOCK ----- */

24 /* RCS $Id: DSObjectInfoInterface.java,v 1.1.1.1 2001/10/23 13:37:19 lizellaman Exp $
25  * $Log: DSObjectInfoInterface.java,v $
26  * Revision 1.1.1.1 2001/10/23 13:37:19 lizellaman
27  * initial sourceforge release
28  *
29  */

30
31 package org.datashare.objects;
32
33 import java.util.Date JavaDoc;
34
35 /**
36  * This interface is intended to allow for common handling of Sessions, Clients,
37  * Channels, etc. All objects in the Session Tree must implement this interface.
38  *
39  * @author Charles Wood
40  * @version 1.0
41  */

42 public interface DSObjectInfoInterface
43    {
44    /**
45     * should be returned by getOriginalType() if this instance represents a ChannelInfo instance
46     *
47     */

48    static String JavaDoc CHANNELTYPE = "ChannelInfo";
49
50    /**
51     * should be returned by getOriginalType() if this instance represents a ClientInfo instance
52     *
53     */

54    static String JavaDoc CLIENTTYPE = "ClientInfo";
55
56    /**
57     * should be returned by getOriginalType() if this instance represents an unknown instance
58     *
59     */

60    static String JavaDoc DEFAULTOBJECTTYPE = "DefaultObjectInfo";
61
62    /**
63     * should be returned by getOriginalType() if this instance represents a SessionInfo instance
64     *
65     */

66    static String JavaDoc SESSIONTYPE = "SessionInfo";
67
68    /**
69     * should be returned by getOriginalType() if this instance represents a ConsumerInfo instance
70     *
71     */

72    static String JavaDoc CONSUMERTYPE = "ConsumerInfo";
73
74    static String JavaDoc SUBSESSIONTYPE = "SubSession";
75    static String JavaDoc SUBCLIENTTYPE = "SubClient";
76
77
78    static String JavaDoc COLLABORANTS = "Collaborants";
79    static String JavaDoc COLLABORATION = "Collaboration";
80    static String JavaDoc ALLSESSIONS = "All Sessions";
81    static String JavaDoc ARCHIVES = "Closed Sessions";
82
83    /**
84     * Retrieves the name of this instance.
85     *
86     * @return the instance's name
87     */

88    String JavaDoc getName();
89
90    /**
91     * Retrieves the Creator/Owner name for this instance, used only for Sessions and Channels
92     *
93     * @return this instance's owner/creator name
94     */

95    String JavaDoc getOwnerName();
96
97    /**
98     * name of this object, used to distinguish this instance from other instances
99     * of the same object/type
100     *
101     * @return name of this instance
102     */

103    String JavaDoc toString();
104
105    /**
106     * class name of this object, used to do casting of Object returned by getObject
107     *
108     * @return type that was saved for this instance
109     */

110    String JavaDoc getType();
111
112    /**
113     * class name of the type this instance is representing. This is typically used
114     * when a parent class is used to represent a sublclass to allow for serialization
115     * of the class.
116     *
117     * @return the type this instance was created to represent
118     */

119    String JavaDoc getOriginalType();
120
121    /**
122     * reference to this object as an Object
123     *
124     * @return the object
125     */

126    Object JavaDoc getObject();
127
128    /**
129     * detailed info about object, for display purposes
130     *
131     * @return description for this instance
132     */

133    String JavaDoc getInfo();
134
135    /**
136     * when this instance was created
137     *
138     * @return time this instance was created
139     */

140    Date JavaDoc getDate();
141
142    /**
143     * indicates if this object is currently active in a JSDT Registry
144     *
145     * @return true if currently active in a JSDT Registry
146     */

147    boolean getActive();
148
149    /**
150     * used when a Hashtable needs a key for this instance. Should be unique for
151     * all instances of the type.
152     *
153     * @return the recommended key value to use in Hashtables for this instance
154     */

155    String JavaDoc getKeyValue();
156
157    /**
158     * used when an EJB for this class is created as a place to store the ADSKey String for
159     * this instance.
160     *
161     * @return the ADSKey String for this instance
162     */

163    String JavaDoc getDatabaseID();
164
165    /**
166     * used when an EJB for this class has been created and we want store the ADSKey String for
167     * this instance.
168     *
169     * @param databaseID the string that could be used to retrieve the EJB for this
170     * instance
171     */

172    void setDatabaseID(String JavaDoc databaseID);
173
174
175    /**
176     * returns the URL for the image of a user, probably valid only if this instance refers to a Client/Consumer
177     */

178    String JavaDoc getImageURL();
179    }
180
Popular Tags