KickJava   Java API By Example, From Geeks To Geeks.

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


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 package com.ibm.webdav;
15
16 import java.io.*;
17 import java.rmi.*;
18 import java.util.*;
19
20 import org.w3c.dom.*;
21
22 /**
23  * A versioned resource represents all revisions of a
24  * particular resource. A versioned resource corresponds
25  * to the root or initial version of all the revisions of
26  * a resource.
27  */

28 public class VersionedResource extends Resource {
29 /**
30  * VersionedResource constructor comment.
31  */

32 public VersionedResource() {
33     super();
34 }
35 /**
36  * VersionedResource constructor comment.
37  * @param resource com.ibm.webdav.Resource
38  * @exception com.ibm.webdav.WebDAVException
39  */

40 public VersionedResource(Resource resource) throws WebDAVException {
41     super(resource);
42 }
43 /**
44  * VersionedResource constructor comment.
45  * @param url java.lang.String
46  * @exception com.ibm.webdav.WebDAVException
47  */

48 public VersionedResource(String JavaDoc url) throws WebDAVException {
49     super(url);
50 }
51 /**
52  * VersionedResource constructor comment.
53  * @param protocol java.lang.String
54  * @param host java.lang.String
55  * @param port int
56  * @param file java.lang.String
57  * @exception com.ibm.webdav.WebDAVException
58  */

59 public VersionedResource(String JavaDoc protocol, String JavaDoc host, int port, String JavaDoc file) throws WebDAVException {
60     super(protocol, host, port, file);
61 }
62 /**
63  * VersionedResource constructor comment.
64  * @param protocol java.lang.String
65  * @param host java.lang.String
66  * @param file java.lang.String
67  * @exception com.ibm.webdav.WebDAVException
68  */

69 public VersionedResource(String JavaDoc protocol, String JavaDoc host, String JavaDoc file) throws WebDAVException {
70     super(protocol, host, file);
71 }
72 /**
73  * VersionedResource constructor comment.
74  * @param url java.net.URL
75  * @exception com.ibm.webdav.WebDAVException
76  */

77 public VersionedResource(java.net.URL JavaDoc url) throws WebDAVException {
78     super(url);
79 }
80 /**
81  * VersionedResource constructor comment.
82  * @param context java.net.URL
83  * @param spec java.lang.String
84  * @exception com.ibm.webdav.WebDAVException
85  */

86 public VersionedResource(java.net.URL JavaDoc context, String JavaDoc spec) throws WebDAVException {
87     super(context, spec);
88 }
89 /** Delete this versioned resource. The versioned resource
90  * and all its revisions are removed from the repository. Any
91  * workspaces resolving to a revision of this versioned resource
92  * will return resource not found status. When used in the revision
93  * selection rule for a workspace, configurations containing a
94  * revision of this resource will result in a resource not found status.
95  *
96  * @return a MultiStatus containing the status of the delete method on each
97  * effected resource.
98  * @exception com.ibm.webdav.WebDAVException
99  * @exception RemoteException
100  * @exception IOException
101  * @exception java.rmi.NotBoundException
102  */

103 public MultiStatus delete() throws WebDAVException {
104     return null;
105 }
106 /**
107  * Get the default target for this versioned resource. The default target
108  * specifies the revision selected when no TargetSelector is specified.
109  *
110  * @return the TargetSelector for the default revision. Must be either
111  * a LabelSelector, a RevisionSelector, or null. Null means the versioned resource
112  * has no default revision.
113  * @exception com.ibm.webdav.WebDAVException
114  */

115 public TargetSelector getDefaultTarget() throws WebDAVException {
116     return null;
117 }
118 /**
119  * A resource may have a number of mutable properties. These are
120  * properties that may change even when the resource is checked in.
121  * Changes to these properties does not require a new revision.
122  *
123  * @return an Enumeration of the mutable properties of this resource
124  * @exception com.ibm.webdav.WebDAVException
125  */

126 public Enumeration getMutableProperties() throws WebDAVException {
127     return null;
128 }
129 /**
130  * Get the revision history for a versioned resource. The revision
131  * history lists the revisions of a resource and their predecessors
132  * and successors. The format of the document is given in section
133  * Revision History. The document will not contain any revisions
134  * if the resource is not versioned.
135  *
136  * @return an XML document containing the revision history of the
137  * associated versioned resource.
138  * @exception com.ibm.webdav.WebDAVException
139  */

140 public Document getRevisionHistory() throws WebDAVException {
141     return null;
142 }
143 /**
144  * Get the revisions of this versioned resource. The first revision is always
145  * the initial revision of the versioned resource, but subsequent entries
146  * are not in any particular order.
147  *
148  * @return An Enumeration of revisions of this VersionedResource
149  * @exception com.ibm.webdav.WebDAVException
150  */

151 public Enumeration getRevisions() throws WebDAVException {
152     return null;
153 }
154 /**
155  * Get the versioning options for this resource. Versioning options
156  * are established by the server and include:
157  * <ul>
158  * <li>Mutable/immutable revisions</li>
159  * <li>Supports multiple activities </li>
160  * <li>Can be a member of a configuration</li>
161  * <li>Is automatically versioned</li>
162  * </ul>
163  *
164  * @return an XML Element containing the versioning options for
165  * this resource
166  * @exception com.ibm.webdav.WebDAVException
167  */

168 public Element getVersioningOptions() throws WebDAVException {
169     return null;
170 }
171 /**
172  * Get the current working resources of this versioned resource.
173  *
174  * @return An Enumeration of current working resources of this VersionedResource
175  * @exception com.ibm.webdav.WebDAVException
176  */

177 public Enumeration getWorkingResources() throws WebDAVException {
178     return null;
179 }
180 /**
181  * A resource can be automatically versioned on each method
182  * that updates its state (content or properties). Non-versioning
183  * aware clients use automatic versioning to support updates. If
184  * a resource is not automatically versioned, attempts to update
185  * the revision without explicitly checking it out first will fail.
186  *
187  * @return true if this resource is automatically versioned,
188  * false if not.
189  * @exception com.ibm.webdav.WebDAVException
190  */

191 public boolean isAutomaticallyVersioned() throws WebDAVException {
192     return false;
193 }
194 /**
195  * When the DAV:linear property of a versioned resource is true, only
196  * one working resource can be checked out from that versioned resource
197  * at any time, and only the revision that has no successors can be checked
198  * out.
199  *
200  * @return true if this resource is constrained to have a linear revision history,
201  * false if not.
202  * @exception com.ibm.webdav.WebDAVException
203  */

204 public boolean isLinear() throws WebDAVException {
205     return false;
206 }
207 /**
208  * Set the default target for this versioned resource. The default target
209  * specifies the revision selected when no TargetSelector is specified.
210  *
211  * @param targetSelector the TargetSelector for the default revision. Must be either
212  * a LabelSelector, a RevisionSelector, or null. Null means the versioned resource
213  * has no default revision.
214  * @exception com.ibm.webdav.WebDAVException
215  */

216 public void setDefaultTarget(TargetSelector targetSelector) throws WebDAVException {
217     
218 }
219 }
220
Popular Tags