org.eclipse.webdav
Interface IServer

All Known Implementing Classes:
DAVClient, LocalDAVClient, RemoteDAVClient

public interface IServer

Represents a WebDAV server API.

There is a one-to-one correspondence between the methods in this interface and methods in the HTTP and WebDAV protocols.

The methods all return a response object; it is the client's responsibility to close() the response when they are done with it.

Note: This class/interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.


Method Summary
 IResponse baselineControl(ILocator locator, IContext context, Document body)
          Corresponds to the BASELINE-CONTROL method defined in the WebDAV Versioning Specification.
 IResponse bind(ILocator source, ILocator destination, IContext context)
          Binds the given source locator, to the given destination.
 IResponse checkin(ILocator locator, IContext context, Document body)
          Corresponds to the CHECKIN method defined in the WebDAV Versioning Specification.
 IResponse checkout(ILocator locator, IContext context, Document body)
          Corresponds to the CHECKOUT method defined in the WebDAV Versioning Specification.
 IResponse copy(ILocator source, ILocator destination, IContext context, Document body)
          Copies the resource with the given locator, to the given destination.
 IResponse delete(ILocator locator, IContext context)
          Deletes the resource with the given locator.
 IResponse get(ILocator locator, IContext context)
          Gets the content of the resource with the given locator.
 IResponse head(ILocator locator, IContext context)
          Returns the message headers from a message send to the server.
 IResponse label(ILocator locator, IContext context, Document body)
          Corresponds to the LABEL method defined in the WebDAV Versioning Specification.
 IResponse lock(ILocator locator, IContext context, Document body)
          Locks the resource with the given locator.
 IResponse merge(ILocator locator, IContext context, Document body)
          Corresponds to the MERGE method defined in the WebDAV Versioning Specification.
 IResponse mkactivity(ILocator locator, IContext context, Document element)
          Creates an activity as specified by the given locator.
 IResponse mkcol(ILocator locator, IContext context, Document element)
          Creates the collection specified by the given locator.
 IResponse mkworkspace(ILocator locator, IContext context, Document element)
          Creates a workspace as specified by the given locator.
 IResponse move(ILocator source, ILocator destination, IContext context, Document body)
          Moves the resource with the given source locator, to the specified destination.
 IResponse options(ILocator locator, IContext context)
          Performs an options call to the server.
 IResponse post(ILocator locator, IContext context, InputStream input)
          Corresponds to the POST method as defined by the HTTP/1.1 specification.
 IResponse propfind(ILocator locator, IContext context, Document body)
          Performs a property find on the server.
 IResponse proppatch(ILocator locator, IContext context, Document body)
          Performs a property patch call on the server.
 IResponse put(ILocator locator, IContext context, InputStream input)
          Puts the given contents onto the server into the specified location.
 IResponse report(ILocator locator, IContext context, Document body)
          Corresponds to the REPORT method defined in the WebDAV Versioning Specification.
 IResponse trace(ILocator locator, IContext context)
          Does a trace call to the server.
 IResponse uncheckout(ILocator locator, IContext context)
          Corresponds to the UNCHECKOUT method defined in the WebDAV Versioning Specification.
 IResponse unlock(ILocator locator, IContext context)
          Unlocks the resource with the given locator.
 IResponse update(ILocator locator, IContext context, Document body)
          Performs an update call on the server.
 IResponse versionControl(ILocator locator, IContext context, Document body)
          Corresponds to the VERSION-CONTROL method defined in the WebDAV Versioning Specification.
 

Method Detail

baselineControl

IResponse baselineControl(ILocator locator,
                          IContext context,
                          Document body)
                          throws IOException
Corresponds to the BASELINE-CONTROL method defined in the WebDAV Versioning Specification. The IResponse body is undefined.

Parameters:
locator - the location of the collection to put under baseline control.
context - key-value pairings defined by the user.
body - the DOM document for the DAV:baseline element.
Returns:
the response from the server; the client must send close() to the response when done with it.
Throws:
IOException - if there was a problem sending the request or receiving the response.

bind

IResponse bind(ILocator source,
               ILocator destination,
               IContext context)
               throws IOException
Binds the given source locator, to the given destination. An overwrite boolean may be defined in the user context. Corresponds to the WebDAV method BIND defined in the WebDAV Bindings Specification (part of the Advanced Collections Protocol)

Parameters:
source - the location of the resource
destination - the location of the resource's desired parent
context - key-value pairings as set by the user
Returns:
the response from the server; the client must send close() to the response when done with it
Throws:
IOException - if there was a problem sending the request or receiving the response

checkin

IResponse checkin(ILocator locator,
                  IContext context,
                  Document body)
                  throws IOException
Corresponds to the CHECKIN method defined in the WebDAV Versioning Specification. The IResponse body is undefined.

Parameters:
locator - the location of the resource to check in.
context - key-value pairings defined by the user.
body - DOM document for DAV:checkin.
Returns:
the response from the server; the client must send close() to the response when done with it.
Throws:
IOException - if there was a problem sending the request or receiving the response.

checkout

IResponse checkout(ILocator locator,
                   IContext context,
                   Document body)
                   throws IOException
Corresponds to the CHECKOUT method defined in the WebDAV Versioning Specification. The IResponse body is undefined.

Parameters:
locator - the location of the resource
context - key-value pairings defined by the user
body - the XML elements that describe the parameters of the checkout in a DAV:checkout element.
Returns:
the response from the server; the client must send close() to the response when done with it.
Throws:
IOException - if there was a problem sending the request or receiving the response.

copy

IResponse copy(ILocator source,
               ILocator destination,
               IContext context,
               Document body)
               throws IOException
Copies the resource with the given locator, to the given destination. Corresponds to the COPY method defined in the WebDAV Specification.

Parameters:
source - the location of the resource
destination - the desired location of the resource copy
context - key-value pairings as defined by the user
body - XML document describing the properties to copy
Returns:
the response from the server; the client must send close() to the response when done with it
Throws:
IOException - if there was a problem sending the request or receiving the response

delete

IResponse delete(ILocator locator,
                 IContext context)
                 throws IOException
Deletes the resource with the given locator. Corresponds to the DELETE method defined in the HTTP/1.1 Specfication.

Parameters:
locator - the location of the resource
context - key-value pairings as defined by the user
Returns:
the response from the server; the client must send close() to the response when done with it
Throws:
IOException - if there was a problem sending the request or receiving the response

get

IResponse get(ILocator locator,
              IContext context)
              throws IOException
Gets the content of the resource with the given locator. Corresponds to the GET method defined in the HTTP/1.1 specification.

The input stream in the resulting response body should be closed by the user.

Parameters:
locator - the location of the resource
context - key-value pairings as defined by the user
Returns:
the response from the server; the client must send close() to the response when done with it
Throws:
IOException - if there was a problem sending the request or receiving the response

head

IResponse head(ILocator locator,
               IContext context)
               throws IOException
Returns the message headers from a message send to the server. Corresponds to the HEAD method defined in the HTTP/1.1 specification.

Parameters:
locator - the location of the resource
context - key-value pairings as defined by the user
Returns:
the response from the server; the client must send close() to the response when done with it
Throws:
IOException - if there was a problem sending the request or receiving the response

label

IResponse label(ILocator locator,
                IContext context,
                Document body)
                throws IOException
Corresponds to the LABEL method defined in the WebDAV Versioning Specification. The IResponse body is undefined.

Parameters:
locator - the location of the resource
context - key-value pairings defined by the user
body - DOM document for DAV:label element
Returns:
the response from the server; the client must send close() to the response when done with it
Throws:
IOException - if there was a problem sending the request or receiving the response

lock

IResponse lock(ILocator locator,
               IContext context,
               Document body)
               throws IOException
Locks the resource with the given locator. Use the information contained in the context and DAV:lockinfo element. Corresponds to the LOCK method defined in the WebDAV specification.

Parameters:
locator - the location of the resource
context - key-value pairings defined by the user
body - XML document containing lock information
Returns:
the response from the server; the client must send close() to the response when done with it
Throws:
IOException - if there was a problem sending the request or receiving the response

merge

IResponse merge(ILocator locator,
                IContext context,
                Document body)
                throws IOException
Corresponds to the MERGE method defined in the WebDAV Versioning Specification.

Parameters:
locator - the location of the resource
context - key-value pairings defined by the user
body - XML document containing MERGE parameters
Returns:
the response from the server; the client must send close() to the response when done with it
Throws:
IOException - if there was a problem sending the request or receiving the response

mkactivity

IResponse mkactivity(ILocator locator,
                     IContext context,
                     Document element)
                     throws IOException
Creates an activity as specified by the given locator. Corresponds to the MKACTIVITY method as defined by the Delta-V Versioning Specification.

Parameters:
locator - the location of the new resource.
context - key-value pairings defined by the user.
element - an undefined XML body document.
Returns:
the response from the server; the client must send close() to the response when done with it
Throws:
IOException - if there was a problem sending the request or receiving the response.

mkcol

IResponse mkcol(ILocator locator,
                IContext context,
                Document element)
                throws IOException
Creates the collection specified by the given locator. Corresponds to the MKCOL method as defined by the WebDAV specification.

Parameters:
locator - the location of the resource
context - key-value pairings defined by the user
element - XML document containing properties
Returns:
the response from the server; the client must send close() to the response when done with it
Throws:
IOException - if there was a problem sending the request or receiving the response

mkworkspace

IResponse mkworkspace(ILocator locator,
                      IContext context,
                      Document element)
                      throws IOException
Creates a workspace as specified by the given locator. Corresponds to the MKWORKSPACE method as defined by the Delta-V Versioning Specification.

Parameters:
locator - the location of the new resource.
context - key-value pairings defined by the user.
element - an undefined XML body document.
Returns:
the response from the server; the client must send close() to the response when done with it
Throws:
IOException - if there was a problem sending the request or receiving the response.

move

IResponse move(ILocator source,
               ILocator destination,
               IContext context,
               Document body)
               throws IOException
Moves the resource with the given source locator, to the specified destination. Corresponds to the MOVE method as defined by the WebDAV specification.

Parameters:
source - the location of the resource
destination - the desired location for the resource
context - key-value pairing defined by the user
body - XML document specifying the properties to move
Returns:
the response from the server; the client must send close() to the response when done with it
Throws:
IOException - if there was a problem sending the request or receiving the response

options

IResponse options(ILocator locator,
                  IContext context)
                  throws IOException
Performs an options call to the server. Answers a list of characteristics of the target resource.

Corresponds to the OPTIONS method as defined by the HTTP/1.1 Specification.

If the resource URL (in the locator) is "*", the server's general capabilities are queried.

Parameters:
locator - the location of the resource
context - key-value pairings defined by the user
Returns:
the response from the server; the client must send close() to the response when done with it
Throws:
IOException - if there was a problem sending the request or receiving the response

post

IResponse post(ILocator locator,
               IContext context,
               InputStream input)
               throws IOException
Corresponds to the POST method as defined by the HTTP/1.1 specification.

The given input stream will be closed by the server after the contents have been consumed.

Parameters:
locator - the location of the resource
context - key-value pairings defined by the user
input - the input stream containing the resource data
Returns:
the response from the server; the client must send close() to the response when done with it
Throws:
IOException - if there was a problem sending the request or receiving the response

propfind

IResponse propfind(ILocator locator,
                   IContext context,
                   Document body)
                   throws IOException
Performs a property find on the server. Corresponds to the PROPFIND method as defined by the WebDAV specification.

Parameters:
locator - the location of the resource
context - key-value pairings defined by the user
body - XML document as defined by the spec
Returns:
the response from the server; the client must send close() to the response when done with it
Throws:
IOException - if there was a problem sending the request or receiving the response

proppatch

IResponse proppatch(ILocator locator,
                    IContext context,
                    Document body)
                    throws IOException
Performs a property patch call on the server. Corresponds to the PROPPATCH method as defined by the WebDAV specification.

Parameters:
locator - the location of the resource
context - key-value pairings defined by the user
body - XML document as defined by the spec
Returns:
the response from the server; the client must send close() to the response when done with it
Throws:
IOException - if there was a problem sending the request or receiving the response

put

IResponse put(ILocator locator,
              IContext context,
              InputStream input)
              throws IOException
Puts the given contents onto the server into the specified location. Corresponds to the PUT method as defined by the HTTP/1.1 specification.

The given input stream will be closed by the server after the contents have been consumed.

Parameters:
locator - the location of the resource
context - key-value pairings defined by the user
input - the input stream containing the resource data
Returns:
the response from the server; the client must send close() to the response when done with it
Throws:
IOException - if there was a problem sending the request or receiving the response

report

IResponse report(ILocator locator,
                 IContext context,
                 Document body)
                 throws IOException
Corresponds to the REPORT method defined in the WebDAV Versioning Specification.

Parameters:
locator - the location of the resource
context - key-value pairings defined by the user
body - XML document containing REPORT parameters
Returns:
the response from the server; the client must send close() to the response when done with it
Throws:
IOException - if there was a problem sending the request or receiving the response

trace

IResponse trace(ILocator locator,
                IContext context)
                throws IOException
Does a trace call to the server. Corresponds to the TRACE method as defined by the HTTP/1.1 specification.

The input stream in the response body should be closed by the user.

Parameters:
locator - the location of the resource
context - key-value pairings defined by the user
Returns:
the response from the server; the client must send close() to the response when done with it
Throws:
IOException - if there was a problem sending the request or receiving the response

uncheckout

IResponse uncheckout(ILocator locator,
                     IContext context)
                     throws IOException
Corresponds to the UNCHECKOUT method defined in the WebDAV Versioning Specification.

Parameters:
locator - the location of the resource
context - key-value pairings defined by the user
Returns:
the response from the server; the client must send close() to the response when done with it
Throws:
IOException - if there was a problem sending the request or receiving the response

unlock

IResponse unlock(ILocator locator,
                 IContext context)
                 throws IOException
Unlocks the resource with the given locator. Corresponds to the UNLOCK method as defined by the WebDAV specification.

Parameters:
locator - the location of the resource
context - key-value pairings defined by the user
Returns:
the response from the server; the client must send close() to the response when done with it
Throws:
IOException - if there was a problem sending the request or receiving the response

update

IResponse update(ILocator locator,
                 IContext context,
                 Document body)
                 throws IOException
Performs an update call on the server. Corresponds to the UPDATE method as defined by the Delta-V specification.

Parameters:
locator - the location of the version-controlled resource.
context - key-value pairings defined by the client.
body - DAV:update XML document as defined by the spec.
Returns:
the response from the server; the client must send close() to the response when done with it
Throws:
IOException - if there was a problem sending the request or receiving the response

versionControl

IResponse versionControl(ILocator locator,
                         IContext context,
                         Document body)
                         throws IOException
Corresponds to the VERSION-CONTROL method defined in the WebDAV Versioning Specification.

Parameters:
locator - the location of the versionable resource.
context - key-value pairings defined by the user.
body - the request body elements as a DOM document.
Returns:
the response from the server; the client must send close() to the response when done with it
Throws:
IOException - if there was a problem sending the request or receiving the response


Copyright © 2001-2014 JBoss by Red Hat. All Rights Reserved.