001: /*
002: * (C) Copyright IBM Corp. 2000 All rights reserved.
003: *
004: * The program is provided "AS IS" without any warranty express or
005: * implied, including the warranty of non-infringement and the implied
006: * warranties of merchantibility and fitness for a particular purpose.
007: * IBM will not be liable for any damages suffered by you as a result
008: * of using the Program. In no event will IBM be liable for any
009: * special, indirect or consequential damages or lost profits even if
010: * IBM has been advised of the possibility of their occurrence. IBM
011: * will not be liable for any third party claims against you.
012: *
013: */
014:
015: package com.ibm.webdav;
016:
017: import java.util.Enumeration;
018:
019: /**
020: * An activity represents a named set of revisions to versioned
021: * resources. A revision of a resource may be checked out in the
022: * context of the current activity of the workspace. Edits are
023: * made in the context of that activity, and the association is
024: * maintained when the resource is checked back in. The same resource
025: * can be checked out in many different activities at the same time
026: * if the server supports parallel development on that resource. These
027: * activities may be merged into other workspaces at some later time
028: * to combine the changes. Activities may be used to manage units of
029: * work required to update a set of resources in some related way.
030: */
031: public class Activity extends Resource {
032: /**
033: * Activity constructor comment.
034: */
035: private Activity() {
036: super ();
037: }
038:
039: /**
040: * Activity constructor comment.
041: * @param resource com.ibm.webdav.Resource
042: * @exception com.ibm.webdav.WebDAVException
043: */
044: private Activity(Resource resource) throws WebDAVException {
045: super (resource);
046: }
047:
048: /**
049: * Activity constructor comment.
050: * @param url java.lang.String
051: * @exception com.ibm.webdav.WebDAVException
052: */
053: private Activity(String url) throws WebDAVException {
054: super (url);
055: }
056:
057: /**
058: * Activity constructor comment.
059: * @param protocol java.lang.String
060: * @param host java.lang.String
061: * @param port int
062: * @param file java.lang.String
063: * @exception com.ibm.webdav.WebDAVException
064: */
065: private Activity(String protocol, String host, int port, String file)
066: throws WebDAVException {
067: super (protocol, host, port, file);
068: }
069:
070: /**
071: * Activity constructor comment.
072: * @param protocol java.lang.String
073: * @param host java.lang.String
074: * @param file java.lang.String
075: * @exception com.ibm.webdav.WebDAVException
076: */
077: private Activity(String protocol, String host, String file)
078: throws WebDAVException {
079: super (protocol, host, file);
080: }
081:
082: /**
083: * Activity constructor comment.
084: * @param url java.net.URL
085: * @exception com.ibm.webdav.WebDAVException
086: */
087: private Activity(java.net.URL url) throws WebDAVException {
088: super (url);
089: }
090:
091: /**
092: * Activity constructor comment.
093: * @param context java.net.URL
094: * @param spec java.lang.String
095: * @exception com.ibm.webdav.WebDAVException
096: */
097: private Activity(java.net.URL context, String spec)
098: throws WebDAVException {
099: super (context, spec);
100: }
101:
102: /**
103: * An activity may depend on a number of other activities in order to
104: * be complete. When an activity is added to a workspace revision
105: * selection rule, its dependent activities are also added.
106: *
107: * @param dependent the dependent activity to add
108: * @exception com.ibm.webdav.WebDAVException
109: */
110: public void addDependent(Activity dependent) throws WebDAVException {
111: }
112:
113: /**
114: * Add a label to the latest revision of all resources mofified in this
115: * activity. Any effected revision
116: * must not already have the label, and the label cannot be the
117: * ame as the revision id. The operation will fail if the collection
118: * is not a versioned resource.
119: * <p>
120: * Labels are used to provide meaningful names that distinguish
121: * revisions of versioned resources. They can be used in the revision
122: * selection rule of the workspace to specify what revision should be
123: * selected by that workspace. A specific label overriding the workspace
124: * may also be used to access revisions.
125: *
126: * @param label the label to add to this revision and potentially
127: * all its members
128: * @exception com.ibm.webdav.WebDAVException
129: */
130: public void addLabel(String label) throws WebDAVException {
131: }
132:
133: /**
134: * See if an activity contains a resource. That is, see if a resource
135: * was revised in the context of this activity.
136: *
137: * @param revision the resource to check for
138: * @return true if the resource revision was updated in this
139: * activity
140: * @exception com.ibm.webdav.WebDAVException
141: */
142: public boolean contains(Resource revision) throws WebDAVException {
143: return false;
144:
145: }
146:
147: /**
148: * Create an Activity at the given location. Servers may require Activities
149: * to be created in a designated portion of the URL namespace.
150: *
151: * @return the newly created Activity
152: * @exception com.ibm.webdav.WebDAVException
153: */
154: public static Activity create(java.net.URL url)
155: throws WebDAVException {
156: return null;
157: }
158:
159: /**
160: * An activity may depend on a number of other activities in order to
161: * be complete. When an activity is added to a workspace revision
162: * selection rule, its dependent activities are also added.
163: *
164: * @return an Enumeration of the Activities this activity dependents on
165: * @exception com.ibm.webdav.WebDAVException
166: */
167: public Enumeration getDependents() throws WebDAVException {
168: return null;
169: }
170:
171: /**
172: * The members of an activity are the revisions that were modified
173: * in that activity.
174: *
175: * @return an Enumeration of Resources that were revised in this activity.
176: * @exception com.ibm.webdav.WebDAVException
177: */
178: public Enumeration getMembers() throws WebDAVException {
179: return null;
180:
181: }
182:
183: /**
184: * An activity may depend on a number of other activities in order to
185: * be complete. When an activity is added to a workspace revision
186: * selection rule, its dependent activities are also added.
187: *
188: * @param dependent the dependent activity to remove
189: * @exception com.ibm.webdav.WebDAVException
190: */
191: public void removeDependent(Activity dependent)
192: throws WebDAVException {
193: }
194:
195: /**
196: * Remove a label from the latest revision of all resource modified
197: * in the context of this activity. An exception is raised if the revision
198: * does not have this label.
199: *
200: * @param label the label to remove from this revision and potentially
201: * all its members
202: * @exception com.ibm.webdav.WebDAVException
203: */
204: public void removeLabel(String label) throws WebDAVException {
205: }
206: }
|