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: package com.ibm.webdav;
015:
016: import java.io.*;
017: import java.rmi.*;
018: import java.util.*;
019:
020: import org.w3c.dom.*;
021:
022: /**
023: * A versioned resource represents all revisions of a
024: * particular resource. A versioned resource corresponds
025: * to the root or initial version of all the revisions of
026: * a resource.
027: */
028: public class VersionedResource extends Resource {
029: /**
030: * VersionedResource constructor comment.
031: */
032: public VersionedResource() {
033: super ();
034: }
035:
036: /**
037: * VersionedResource constructor comment.
038: * @param resource com.ibm.webdav.Resource
039: * @exception com.ibm.webdav.WebDAVException
040: */
041: public VersionedResource(Resource resource) throws WebDAVException {
042: super (resource);
043: }
044:
045: /**
046: * VersionedResource constructor comment.
047: * @param url java.lang.String
048: * @exception com.ibm.webdav.WebDAVException
049: */
050: public VersionedResource(String url) throws WebDAVException {
051: super (url);
052: }
053:
054: /**
055: * VersionedResource constructor comment.
056: * @param protocol java.lang.String
057: * @param host java.lang.String
058: * @param port int
059: * @param file java.lang.String
060: * @exception com.ibm.webdav.WebDAVException
061: */
062: public VersionedResource(String protocol, String host, int port,
063: String file) throws WebDAVException {
064: super (protocol, host, port, file);
065: }
066:
067: /**
068: * VersionedResource constructor comment.
069: * @param protocol java.lang.String
070: * @param host java.lang.String
071: * @param file java.lang.String
072: * @exception com.ibm.webdav.WebDAVException
073: */
074: public VersionedResource(String protocol, String host, String file)
075: throws WebDAVException {
076: super (protocol, host, file);
077: }
078:
079: /**
080: * VersionedResource constructor comment.
081: * @param url java.net.URL
082: * @exception com.ibm.webdav.WebDAVException
083: */
084: public VersionedResource(java.net.URL url) throws WebDAVException {
085: super (url);
086: }
087:
088: /**
089: * VersionedResource constructor comment.
090: * @param context java.net.URL
091: * @param spec java.lang.String
092: * @exception com.ibm.webdav.WebDAVException
093: */
094: public VersionedResource(java.net.URL context, String spec)
095: throws WebDAVException {
096: super (context, spec);
097: }
098:
099: /** Delete this versioned resource. The versioned resource
100: * and all its revisions are removed from the repository. Any
101: * workspaces resolving to a revision of this versioned resource
102: * will return resource not found status. When used in the revision
103: * selection rule for a workspace, configurations containing a
104: * revision of this resource will result in a resource not found status.
105: *
106: * @return a MultiStatus containing the status of the delete method on each
107: * effected resource.
108: * @exception com.ibm.webdav.WebDAVException
109: * @exception RemoteException
110: * @exception IOException
111: * @exception java.rmi.NotBoundException
112: */
113: public MultiStatus delete() throws WebDAVException {
114: return null;
115: }
116:
117: /**
118: * Get the default target for this versioned resource. The default target
119: * specifies the revision selected when no TargetSelector is specified.
120: *
121: * @return the TargetSelector for the default revision. Must be either
122: * a LabelSelector, a RevisionSelector, or null. Null means the versioned resource
123: * has no default revision.
124: * @exception com.ibm.webdav.WebDAVException
125: */
126: public TargetSelector getDefaultTarget() throws WebDAVException {
127: return null;
128: }
129:
130: /**
131: * A resource may have a number of mutable properties. These are
132: * properties that may change even when the resource is checked in.
133: * Changes to these properties does not require a new revision.
134: *
135: * @return an Enumeration of the mutable properties of this resource
136: * @exception com.ibm.webdav.WebDAVException
137: */
138: public Enumeration getMutableProperties() throws WebDAVException {
139: return null;
140: }
141:
142: /**
143: * Get the revision history for a versioned resource. The revision
144: * history lists the revisions of a resource and their predecessors
145: * and successors. The format of the document is given in section
146: * Revision History. The document will not contain any revisions
147: * if the resource is not versioned.
148: *
149: * @return an XML document containing the revision history of the
150: * associated versioned resource.
151: * @exception com.ibm.webdav.WebDAVException
152: */
153: public Document getRevisionHistory() throws WebDAVException {
154: return null;
155: }
156:
157: /**
158: * Get the revisions of this versioned resource. The first revision is always
159: * the initial revision of the versioned resource, but subsequent entries
160: * are not in any particular order.
161: *
162: * @return An Enumeration of revisions of this VersionedResource
163: * @exception com.ibm.webdav.WebDAVException
164: */
165: public Enumeration getRevisions() throws WebDAVException {
166: return null;
167: }
168:
169: /**
170: * Get the versioning options for this resource. Versioning options
171: * are established by the server and include:
172: * <ul>
173: * <li>Mutable/immutable revisions</li>
174: * <li>Supports multiple activities </li>
175: * <li>Can be a member of a configuration</li>
176: * <li>Is automatically versioned</li>
177: * </ul>
178: *
179: * @return an XML Element containing the versioning options for
180: * this resource
181: * @exception com.ibm.webdav.WebDAVException
182: */
183: public Element getVersioningOptions() throws WebDAVException {
184: return null;
185: }
186:
187: /**
188: * Get the current working resources of this versioned resource.
189: *
190: * @return An Enumeration of current working resources of this VersionedResource
191: * @exception com.ibm.webdav.WebDAVException
192: */
193: public Enumeration getWorkingResources() throws WebDAVException {
194: return null;
195: }
196:
197: /**
198: * A resource can be automatically versioned on each method
199: * that updates its state (content or properties). Non-versioning
200: * aware clients use automatic versioning to support updates. If
201: * a resource is not automatically versioned, attempts to update
202: * the revision without explicitly checking it out first will fail.
203: *
204: * @return true if this resource is automatically versioned,
205: * false if not.
206: * @exception com.ibm.webdav.WebDAVException
207: */
208: public boolean isAutomaticallyVersioned() throws WebDAVException {
209: return false;
210: }
211:
212: /**
213: * When the DAV:linear property of a versioned resource is true, only
214: * one working resource can be checked out from that versioned resource
215: * at any time, and only the revision that has no successors can be checked
216: * out.
217: *
218: * @return true if this resource is constrained to have a linear revision history,
219: * false if not.
220: * @exception com.ibm.webdav.WebDAVException
221: */
222: public boolean isLinear() throws WebDAVException {
223: return false;
224: }
225:
226: /**
227: * Set the default target for this versioned resource. The default target
228: * specifies the revision selected when no TargetSelector is specified.
229: *
230: * @param targetSelector the TargetSelector for the default revision. Must be either
231: * a LabelSelector, a RevisionSelector, or null. Null means the versioned resource
232: * has no default revision.
233: * @exception com.ibm.webdav.WebDAVException
234: */
235: public void setDefaultTarget(TargetSelector targetSelector)
236: throws WebDAVException {
237:
238: }
239: }
|