KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > ibm > webdav > Activity


1 /*
2  * (C) Copyright IBM Corp. 2000 All rights reserved.
3  *
4  * The program is provided "AS IS" without any warranty express or
5  * implied, including the warranty of non-infringement and the implied
6  * warranties of merchantibility and fitness for a particular purpose.
7  * IBM will not be liable for any damages suffered by you as a result
8  * of using the Program. In no event will IBM be liable for any
9  * special, indirect or consequential damages or lost profits even if
10  * IBM has been advised of the possibility of their occurrence. IBM
11  * will not be liable for any third party claims against you.
12  *
13  */

14
15 package com.ibm.webdav;
16
17 import java.util.Enumeration JavaDoc;
18
19 /**
20  * An activity represents a named set of revisions to versioned
21  * resources. A revision of a resource may be checked out in the
22  * context of the current activity of the workspace. Edits are
23  * made in the context of that activity, and the association is
24  * maintained when the resource is checked back in. The same resource
25  * can be checked out in many different activities at the same time
26  * if the server supports parallel development on that resource. These
27  * activities may be merged into other workspaces at some later time
28  * to combine the changes. Activities may be used to manage units of
29  * work required to update a set of resources in some related way.
30  */

31 public class Activity extends Resource {
32 /**
33  * Activity constructor comment.
34  */

35 private Activity() {
36     super();
37 }
38 /**
39  * Activity constructor comment.
40  * @param resource com.ibm.webdav.Resource
41  * @exception com.ibm.webdav.WebDAVException
42  */

43 private Activity(Resource resource) throws WebDAVException {
44     super(resource);
45 }
46 /**
47  * Activity constructor comment.
48  * @param url java.lang.String
49  * @exception com.ibm.webdav.WebDAVException
50  */

51 private Activity(String JavaDoc url) throws WebDAVException {
52     super(url);
53 }
54 /**
55  * Activity constructor comment.
56  * @param protocol java.lang.String
57  * @param host java.lang.String
58  * @param port int
59  * @param file java.lang.String
60  * @exception com.ibm.webdav.WebDAVException
61  */

62 private Activity(String JavaDoc protocol, String JavaDoc host, int port, String JavaDoc file) throws WebDAVException {
63     super(protocol, host, port, file);
64 }
65 /**
66  * Activity constructor comment.
67  * @param protocol java.lang.String
68  * @param host java.lang.String
69  * @param file java.lang.String
70  * @exception com.ibm.webdav.WebDAVException
71  */

72 private Activity(String JavaDoc protocol, String JavaDoc host, String JavaDoc file) throws WebDAVException {
73     super(protocol, host, file);
74 }
75 /**
76  * Activity constructor comment.
77  * @param url java.net.URL
78  * @exception com.ibm.webdav.WebDAVException
79  */

80 private Activity(java.net.URL JavaDoc url) throws WebDAVException {
81     super(url);
82 }
83 /**
84  * Activity constructor comment.
85  * @param context java.net.URL
86  * @param spec java.lang.String
87  * @exception com.ibm.webdav.WebDAVException
88  */

89 private Activity(java.net.URL JavaDoc context, String JavaDoc spec) throws WebDAVException {
90     super(context, spec);
91 }
92 /**
93 * An activity may depend on a number of other activities in order to
94 * be complete. When an activity is added to a workspace revision
95 * selection rule, its dependent activities are also added.
96 *
97 * @param dependent the dependent activity to add
98 * @exception com.ibm.webdav.WebDAVException
99 */

100 public void addDependent(Activity dependent) throws WebDAVException {
101 }
102 /**
103 * Add a label to the latest revision of all resources mofified in this
104 * activity. Any effected revision
105 * must not already have the label, and the label cannot be the
106 * ame as the revision id. The operation will fail if the collection
107 * is not a versioned resource.
108 * <p>
109 * Labels are used to provide meaningful names that distinguish
110 * revisions of versioned resources. They can be used in the revision
111 * selection rule of the workspace to specify what revision should be
112 * selected by that workspace. A specific label overriding the workspace
113 * may also be used to access revisions.
114 *
115 * @param label the label to add to this revision and potentially
116 * all its members
117 * @exception com.ibm.webdav.WebDAVException
118 */

119 public void addLabel(String JavaDoc label) throws WebDAVException {
120 }
121 /**
122  * See if an activity contains a resource. That is, see if a resource
123  * was revised in the context of this activity.
124  *
125  * @param revision the resource to check for
126  * @return true if the resource revision was updated in this
127  * activity
128  * @exception com.ibm.webdav.WebDAVException
129  */

130 public boolean contains(Resource revision) throws WebDAVException {
131     return false;
132     
133 }
134 /**
135  * Create an Activity at the given location. Servers may require Activities
136  * to be created in a designated portion of the URL namespace.
137  *
138  * @return the newly created Activity
139  * @exception com.ibm.webdav.WebDAVException
140  */

141 public static Activity create(java.net.URL JavaDoc url) throws WebDAVException {
142     return null;
143 }
144 /**
145 * An activity may depend on a number of other activities in order to
146 * be complete. When an activity is added to a workspace revision
147 * selection rule, its dependent activities are also added.
148 *
149 * @return an Enumeration of the Activities this activity dependents on
150 * @exception com.ibm.webdav.WebDAVException
151 */

152 public Enumeration JavaDoc getDependents() throws WebDAVException {
153     return null;
154 }
155 /**
156  * The members of an activity are the revisions that were modified
157  * in that activity.
158  *
159  * @return an Enumeration of Resources that were revised in this activity.
160  * @exception com.ibm.webdav.WebDAVException
161  */

162 public Enumeration JavaDoc getMembers() throws WebDAVException {
163     return null;
164     
165 }
166 /**
167 * An activity may depend on a number of other activities in order to
168 * be complete. When an activity is added to a workspace revision
169 * selection rule, its dependent activities are also added.
170 *
171 * @param dependent the dependent activity to remove
172 * @exception com.ibm.webdav.WebDAVException
173 */

174 public void removeDependent(Activity dependent) throws WebDAVException {
175 }
176 /**
177 * Remove a label from the latest revision of all resource modified
178 * in the context of this activity. An exception is raised if the revision
179 * does not have this label.
180 *
181 * @param label the label to remove from this revision and potentially
182 * all its members
183 * @exception com.ibm.webdav.WebDAVException
184 */

185 public void removeLabel(String JavaDoc label) throws WebDAVException {
186 }
187 }
188
Popular Tags