|
| Foundation |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||
com.sas.services.webdav.DAVResource
@SASScope(value="ALL") @BinaryCompatibilityOnly public class DAVResource
A DAVResource represents a WebDAV (Web-based Distributed Authoring and Versioning) resource as specified in IETF RFC
2518.
To create a DAVResource, use a ConnectionInfo object passed to the constructor. ConnectionInfo includes the URL
of the resource (containing the host, port and path), user ID, password, proxy host, proxy port, proxy user ID,
proxy password. The DAVResource object can then be manipulated using the various methods defined in the
Resource interface. After any operation on a resource, check the status on the object
using getStatusCode() and getStatusMessage(). For example,
try
{
ConnectionInfo connectionInfo = new ConnectionInfo("http://http-server/path-to-resource",
"user",
"pwd");
// proxy information, if required
connectionInfo.setProxyHost("myproxy.com");
connectionInfo.setProxyPort(3100);
DAVResource davResource1 = new DAVResource(connectionInfo);
int httpStatusCode = davResource1.getStatusCode();
if (HttpStatus.SC_NOT_FOUND == httpStatusCode)
{
// DAV resource was not found
}
davResource1.setProperty(...);
if (HttpStatus.SC_OK != davResource1.getStatusCode())
{
out.println(davResource1.getStatusMessage());
}
}
catch (DAVException e)
{
// handle the exception
}
In order to create a collection use the longer form of the constructor. For example,
DAVResource davResource2 = new DAVResource(connectionInfo, true);
int httpStatusCode = davResource2.getStatusCode();
if (HttpStatus.SC_NOT_FOUND == httpStatusCode)
{
// DAV resource was not found
}
This will ensure that davResource2 is a collection resource (it may contain other resources). Alternatively, do this in two steps
DAVResource davResource2 = new DAVResource(connectionInfo);
int httpStatusCode = davResource2.getStatusCode();
if (HttpStatus.SC_NOT_FOUND == httpStatusCode)
{
// DAV resource was not found
}
davResource2.makeCollection();
| Field Summary | |
|---|---|
protected ConnectionInfo |
_connectionInfo
Connection information. |
static int |
DONT_CARE
|
static int |
HTTP_DEFAULT_PORT
The default port for HTTP is 80. |
static int |
MUST_EXIST
|
static int |
MUST_NOT_EXIST
|
| Constructor Summary | |
|---|---|
DAVResource(ConnectionInfo cInfo)
Creates a DAVResource using the connection information. |
|
DAVResource(ConnectionInfo cInfo,
boolean createCollection)
Creates a DAVResource using the connection information. |
|
DAVResource(java.lang.String url)
Creates a DAVResource using a string URL. |
|
DAVResource(java.lang.String url,
boolean createCollection)
Creates a DAVResource using a string URL and boolean flag to indicate whether a collection should be created. |
|
DAVResource(java.lang.String url,
java.lang.String userName,
java.lang.String password)
Creates a DAVResource using a string URL, userName and password. |
|
DAVResource(java.net.URL url)
Creates a DAVResource using a Java URL. |
|
| Method Summary | |
|---|---|
void |
close()
Closes the socket used for this connection. |
org.apache.http.entity.ContentType |
contentType()
Gets the Apache HTTP entity content type of the content for this DAV resource. |
DAVResource |
copy(java.lang.String targetPath)
Copies resource to the target destination. |
void |
delete()
Deletes this DAV resource. |
void |
doCheckin()
Check in this DAV resource. |
void |
doCheckout()
Checks out this DAV resource. |
void |
doControl()
Puts the resource under version control. |
void |
doLabel(int labelAction,
java.lang.String label)
Modifies the version label on the resource (if this is supported by the server). |
void |
doLabel(int labelAction,
java.lang.String label,
int depth)
Modifies the label on the version resource (if this is supported by the server). |
java.util.Properties |
doOptions()
Gets the options as Properties representing the header name/value pairs. |
DavPropertyResult |
doReport(org.apache.jackrabbit.webdav.version.report.ReportInfo reportInfo)
Gets a report on the current DAV resource. |
DavPropertyResult |
doSearch(org.apache.jackrabbit.webdav.search.SearchInfo searchInfo)
The SEARCH method invokes one of the implemented search grammars on the server to evaluate the query. |
void |
doUncheckout()
Uncheckout this DAV resource, canceling a previous checkout. |
boolean |
exists()
Returns whether the resource exists. |
static java.lang.String |
extractPath(java.lang.String url)
Extract the path (query and fragment identifier from a URL). |
com.sas.services.webdav.Acl |
getAcl()
Gets the access control list for this DAV resource. |
java.lang.String |
getACL()
Gets the access control list (ACL) for this DAV resource. |
java.lang.String[] |
getAllowedMethods()
Returns a list of methods allowed on this resource. |
com.sas.services.webdav.Version |
getCheckedIn()
Retrieves the currently checked in resource. |
com.sas.services.webdav.Version |
getCheckedOut()
Retrieves the currently checked out resource. |
java.util.List<java.lang.String> |
getChildrenList(java.lang.String path)
Gets the list of children. |
java.util.Map<java.lang.String,PropertyMap> |
getChildrenProperties(PropertyName[] properties)
Get all the properties of a collection's members (depth=1) in as single server request. |
byte[] |
getContents()
Gets the contents of this DAV resource as a byte array. |
void |
getContents(java.io.File fileData)
Gets the content of this DAV resource into a file specified as the parameter. |
java.lang.String |
getContentsAsString()
Gets the contents of this DAV resource as a String. |
java.io.InputStream |
getContentsInputStream()
Gets the content of this DAV resource as a stream. |
java.lang.String |
getContentType()
Gets the content type of the content for this DAV resource. |
java.lang.String[] |
getDavCapabilities()
Returns a list of DAV capabilities. |
DavPropertyResult |
getDavProperties()
Gets all of the DAV resource's properties using the resource's depth. |
DavPropertyResult |
getDavProperties(org.apache.jackrabbit.webdav.property.DavPropertyNameSet davPropertyNameSet,
int depth)
Gets the properties for the specified DAV property names and search depth. |
DavPropertyResult |
getDavProperties(int depth)
Gets all of the DAV resource's properties for the specified depth. |
DavPropertyResult |
getDavProperties(PropertyName[] propertyNames)
Gets all the properties for the specified property names on the DAV resource. |
DavPropertyResult |
getDavProperties(PropertyName[] propertyNames,
int depth)
Gets all the properties for the specified property names on the DAV resource. |
DavPropertyResult |
getDavPropertyNames()
Gets DAV properties for all of a DAV resource's property names. |
DavPropertyResult |
getDavPropertyNames(int depth)
Gets DAV properties for all of a DAV resource's property names for the specified depth. |
int |
getDepth()
Gets the value for depth. |
int |
getExistsRequirement()
Gets the existence requirement. |
java.lang.String |
getLock(java.lang.String userName)
Gets this DAV resource's lock token for the specified user. |
java.util.Map |
getMultiStatus()
Returns the multiple status information for the last operation. |
boolean |
getOverwrite()
Gets the overwrite flag which specifies whether this DAV resource can be overwritten. |
java.lang.String |
getPath()
Gets the path for the WebDAV resource that is currently represented by this DAVResource. |
java.util.List |
getPreviousVersionNames()
Gets a list of previous version names for this DAV resource. |
PropertyMap |
getPropertyMap()
Returns a property map of the resources properties. |
int |
getStatusCode()
Gets the HTTP status code for the last operation/method. |
java.lang.String |
getStatusMessage()
Gets the message associated with the status code for the last operation/method. |
java.lang.String |
getTempDir()
Returns the current setting for the directory for temporary files. |
java.net.URL |
getURL()
Gets the URL that this DAV resource represents. |
com.sas.services.webdav.Version |
getVersion(java.lang.String versionName)
Gets a particular version of this DAV resource. |
protected boolean |
isAuthReqd()
Returns whether a password is required to connect to this server |
boolean |
isCollection()
Is this DAV resource a collection? |
boolean |
isLocked()
Is this DAV resource locked? |
java.lang.String |
lock()
Locks this DAV resource. |
boolean |
makeCollection()
Makes a collection. |
DAVResource |
move(java.lang.String targetPath)
Moves this DAV resource to the location given in the parameter. |
void |
removeProperties(org.w3c.dom.Element[] propNames)
Removes the properties specified in the parameter. |
void |
removeProperties(PropertyName[] propertyNames)
Removes the properties specified in the parameter. |
void |
removeProperty(org.w3c.dom.Element propName)
Removes the property specified in the parameter. |
void |
removeProperty(PropertyName propName)
Removes the property specified in the parameter. |
void |
removeProperty(java.lang.String propName)
Removes the property specified in the parameter. |
java.lang.String |
setAcl(com.sas.services.webdav.Acl acl)
Sets the access control list for this DAV resource. |
java.lang.String |
setACL(java.lang.String acl)
Set/Update the Access Control List for this DAV resource. |
void |
setContents(byte[] contents)
Sets the contents of the resource, passing in a byte array. |
void |
setContents(java.io.InputStream is)
Sets the contents of the resource from an input stream. |
void |
setContents(java.lang.String content)
Sets the contents of the resource, passing in a URL. |
void |
setContents(java.net.URL url)
Sets the contents of the resource, passing in a URL. |
void |
setContentType(java.lang.String contentType)
Sets the contents type for the content of the resource. |
void |
setCredentialsProvider(org.apache.http.client.CredentialsProvider credentialsProvider)
Sets a credentials provider. |
void |
setDebug(int debug)
Set the value for debug. |
void |
setDepth(int depth)
Set the value for depth. |
void |
setExistsRequirement(int requirement)
Sets the existence requirement. |
void |
setOverwrite(boolean overwrite)
Sets the overwrite flag which specifies whether this DAV resource can be overwritten. |
void |
setPassword(java.lang.String password)
Set the value for password. |
void |
setPath(java.lang.String path)
Sets the path for this DAV resource. |
void |
setProperties(org.w3c.dom.DocumentFragment props)
Sets the values of properties, as given in the parameter. |
void |
setProperties(org.w3c.dom.Element[] elems)
Sets the values of properties, as given in the parameter. |
void |
setProperties(PropertyName[] propNames,
java.lang.String[] propValues)
Sets the values of properties, as given in the parameter. |
void |
setProperty(org.w3c.dom.Element prop)
Sets the value of a property, as given in the parameter. |
void |
setProperty(PropertyName propName,
java.lang.String propValue)
Sets the value of a property, as given in the parameter. |
void |
setTempDir(java.lang.String tempDir)
Provides a way to set a directory for temporary files. |
void |
setUserName(java.lang.String userName)
Set the value for userName. |
boolean |
SUCCEEDED()
Returns whether the last method was successful or not. |
protected static boolean |
SUCCEEDED(int statusCode)
|
static java.lang.String |
unencodePath(java.lang.String path)
Unencode the path. |
void |
unlock()
Unlocks the resource, if previously locked by the same principal. |
void |
unlock(java.lang.String lockToken)
Unlocks the resource, with the correct locktoken. |
| Field Detail |
|---|
public static final int HTTP_DEFAULT_PORT
80.
protected ConnectionInfo _connectionInfo
public static final int DONT_CARE
public static final int MUST_EXIST
public static final int MUST_NOT_EXIST
| Constructor Detail |
|---|
public DAVResource(java.lang.String url)
throws DAVException
Note that one should check the HTTP status code (e.g. HttpStatus.SC_NOT_FOUND)
after invoking this constructor since a DAVException is not thrown for
all exceptions.
url - URL for the resource.
DAVException - if a DAV Server error occurs.
public DAVResource(java.lang.String url,
java.lang.String userName,
java.lang.String password)
throws DAVException
Note that one should check the HTTP status code (e.g. HttpStatus.SC_NOT_FOUND)
after invoking this constructor since a DAVException is not thrown for
all exceptions.
url - URL for the resourceuserName - authentication user namepassword - password for authentication
DAVException - if a DAV Server error occurs.
public DAVResource(java.net.URL url)
throws DAVException
Note that one should check the HTTP status code (e.g. HttpStatus.SC_NOT_FOUND)
after invoking this constructor since a DAVException is not thrown for
all exceptions.
url - URL for the resource
DAVException - if a DAV Server error occurs.
public DAVResource(java.lang.String url,
boolean createCollection)
throws DAVException
Note that one should check the HTTP status code (e.g. HttpStatus.SC_NOT_FOUND)
after invoking this constructor since a DAVException is not thrown for
all exceptions.
url - URL for the resourcecreateCollection - The URL indicates a collection resource
DAVException - if a DAV Server error occurs.
public DAVResource(ConnectionInfo cInfo)
throws DAVException
Note that one should check the HTTP status code (e.g. HttpStatus.SC_NOT_FOUND)
after invoking this constructor since a DAVException is not thrown for
all exceptions.
cInfo - The connection information for the resource
DAVException - if a DAV Server error occurs.
public DAVResource(ConnectionInfo cInfo,
boolean createCollection)
throws DAVException
Note that one should check the HTTP status code (e.g. HttpStatus.SC_NOT_FOUND)
after invoking this constructor since a DAVException is not thrown for
all exceptions.
cInfo - The connection information for the resourcecreateCollection - create a DAV collection if true
DAVException - if a DAV Server error occurs.| Method Detail |
|---|
public void setCredentialsProvider(org.apache.http.client.CredentialsProvider credentialsProvider)
DAVResourceInterface
setCredentialsProvider in interface DAVResourceInterface
public boolean makeCollection()
throws DAVException
makeCollection in interface DAVResourceInterfaceDAVException - in the case of a WebDAV error.
public DAVResource copy(java.lang.String targetPath)
throws DAVException,
java.rmi.RemoteException
copy in interface DAVResourceInterfacetargetPath - location to which current resource is to be copied.
DAVException - in the case of a WebDAV error.
java.rmi.RemoteException - in the case of network failures.
public void delete()
throws DAVException,
java.rmi.RemoteException
delete in interface DAVResourceInterfaceDAVException - in the event of a WebDAV failure.
java.rmi.RemoteException - in the event of network failure.
public java.lang.String getLock(java.lang.String userName)
throws DAVException
userName - Name of the user whose lock token is desired for this DAV resource.
null if the specified user does not own the lock for this DAV resource.
DAVException - if an error is encountered.
public byte[] getContents()
throws DAVException,
java.rmi.RemoteException
getContents in interface DAVResourceInterfaceDAVException - in the event of a WebDAV failure.
java.rmi.RemoteException - in the event of network failure.
public java.lang.String getContentsAsString()
throws DAVException,
java.rmi.RemoteException
getContentsAsString in interface DAVResourceInterfaceDAVException - in the event of a WebDAV failure.
java.rmi.RemoteException - in the event of network failure.
public void getContents(java.io.File fileData)
throws DAVException,
java.rmi.RemoteException
getContents in interface DAVResourceInterfacefileData - The file into which the contents of the resource should be written.
DAVException - in the event of a WebDAV failure.
java.rmi.RemoteException - in the event of network failure.
public java.io.InputStream getContentsInputStream()
throws DAVException,
java.rmi.RemoteException
getContentsInputStream in interface DAVResourceInterfaceDAVException - in the event of a WebDAV failure.
java.rmi.RemoteException - in the event of network failure.public java.lang.String getContentType()
getContentType in interface DAVResourceInterfaceDAVResourceInterface.contentType(),
DAVResourceInterface.setContentType(String)public org.apache.http.entity.ContentType contentType()
contentType in interface DAVResourceInterfacenull if no MIME type has been specified.DAVResourceInterface.getContentType(),
DAVResourceInterface.setContentType(String)
public DavPropertyResult getDavProperties()
throws DAVException,
java.rmi.RemoteException
getDavProperties in interface DAVResourceInterfaceDavPropertyResult which has the DAV properties which were returned by the property find method.
DAVException - in the case of server failures.
java.rmi.RemoteException - in the case of network failures.DAVResourceInterface.setDepth(int),
DAVResourceInterface.getDavProperties(int)
public DavPropertyResult getDavProperties(int depth)
throws DAVException,
java.rmi.RemoteException
getDavProperties in interface DAVResourceInterfacedepth - The depth on which DAV operations will be based. Specify one of DavConstants.DEPTH_0 or DavConstants.DEPTH_1 or DavConstants.DEPTH_INFINITY.
DavPropertyResult which has the DAV properties which were returned by the property find method.
DAVException - in the case of server failures.
java.rmi.RemoteException - in the case of network failures.DAVResourceInterface.getDavProperties()
public DavPropertyResult getDavProperties(PropertyName[] propertyNames)
throws DAVException,
java.rmi.RemoteException
getDavProperties in interface DAVResourceInterfacepropertyNames - Array of property names, specifying which properties should be returned.
DavPropertyResult which has the DAV properties which were returned by the property find method.
DAVException - in the case of server failures.
java.rmi.RemoteException - in the case of network failures.
public DavPropertyResult getDavProperties(PropertyName[] propertyNames,
int depth)
throws DAVException,
java.rmi.RemoteException
getDavProperties in interface DAVResourceInterfacepropertyNames - Array of property names, specifying which properties should be returned.depth - The depth on which DAV operations will be based. Specify one of DavConstants.DEPTH_0 or DavConstants.DEPTH_1 or DavConstants.DEPTH_INFINITY.
DavPropertyResult which has the DAV properties which were returned by the property find method.
DAVException - in the case of server failures.
java.rmi.RemoteException - in the case of network failures.
public DavPropertyResult getDavProperties(org.apache.jackrabbit.webdav.property.DavPropertyNameSet davPropertyNameSet,
int depth)
throws DAVException,
java.rmi.RemoteException
getDavProperties in interface DAVResourceInterfacedavPropertyNameSet - Set of the names of the DAV properties which should be returned.depth - The depth on which DAV operations will be based. Specify one of DavConstants.DEPTH_0 or DavConstants.DEPTH_1 or DavConstants.DEPTH_INFINITY.
DavPropertyResult which has the DAV properties which were returned by the property find method.
DAVException - in the case of server failures.
java.rmi.RemoteException - in the case of network failures.
public DavPropertyResult getDavPropertyNames()
throws DAVException,
java.rmi.RemoteException
getDavPropertyNames in interface DAVResourceInterfaceDavPropertyResult which has the DAV properties which were returned by the property find method.
DAVException - in the case of server failures.
java.rmi.RemoteException - in the case of network failures.DAVResourceInterface.getDavPropertyNames(int),
DAVResourceInterface.setDepth(int)
public DavPropertyResult getDavPropertyNames(int depth)
throws DAVException,
java.rmi.RemoteException
getDavPropertyNames in interface DAVResourceInterfaceDavPropertyResult which has the DAV properties which were returned by the property find method.
DAVException - in the case of server failures.
java.rmi.RemoteException - in the case of network failures.DAVResourceInterface.getDavPropertyNames()
public int getStatusCode()
throws DAVException,
java.rmi.RemoteException
getStatusCode in interface DAVResourceInterfaceDAVException - in the event of a WebDAV failure.
java.rmi.RemoteException - in the event of network failure.public java.lang.String getStatusMessage()
getStatusMessage in interface DAVResourceInterface
public java.net.URL getURL()
throws DAVException,
java.rmi.RemoteException
getURL in interface DAVResourceInterfaceDAVException - in the event of a WebDAV failure.
java.rmi.RemoteException - in the event of network failure.
public boolean isCollection()
throws DAVException,
java.rmi.RemoteException
isCollection in interface DAVResourceInterfacetrue if it is a collection, false otherwise.
DAVException - in the event of a WebDAV failure.
java.rmi.RemoteException - in the event of network failure.
public boolean isLocked()
throws DAVException,
java.rmi.RemoteException
isLocked in interface DAVResourceInterfacetrue if it is locked, false otherwise.
DAVException - in the event of a WebDAV failure.
java.rmi.RemoteException - in the event of network failure.
public java.lang.String lock()
throws DAVException,
java.rmi.RemoteException
lock in interface DAVResourceInterfaceDAVException - in the event of a WebDAV failure.
java.rmi.RemoteException - in the event of network failure.
public DAVResource move(java.lang.String targetPath)
throws DAVException,
java.rmi.RemoteException
move in interface DAVResourceInterfacetargetPath - The destination URL for this copy.
DAVException - in the event of a WebDAV failure.
java.rmi.RemoteException - in the event of network failure.
public void removeProperties(PropertyName[] propertyNames)
throws DAVException,
java.rmi.RemoteException
removeProperties in interface DAVResourceInterfacepropertyNames - An array of property names that should be removed.
DAVException - in the event of a WebDAV failure.
java.rmi.RemoteException - in the event of network failure.
public void removeProperties(org.w3c.dom.Element[] propNames)
throws DAVException,
java.rmi.RemoteException
removeProperties in interface DAVResourceInterfacepropNames - An array of property names that should be removed.
DAVException - in the event of a WebDAV failure.
java.rmi.RemoteException - in the event of network failure.
public void removeProperty(org.w3c.dom.Element propName)
throws DAVException,
java.rmi.RemoteException
removeProperty in interface DAVResourceInterfacepropName - The name of a property that should be removed from this DAV resource.
DAVException - in the event of a WebDAV failure.
java.rmi.RemoteException - in the event of network failure.
public void removeProperty(java.lang.String propName)
throws DAVException,
java.rmi.RemoteException
removeProperty in interface DAVResourceInterfacepropName - The name of a property that should be removed from this DAV resource.
DAVException - in the event of a WebDAV failure.
java.rmi.RemoteException - in the event of network failure.
public void removeProperty(PropertyName propName)
throws DAVException,
java.rmi.RemoteException
removeProperty in interface DAVResourceInterfacepropName - The name of a property that should be removed from this DAV resource.
DAVException - in the event of a WebDAV failure.
java.rmi.RemoteException - in the event of network failure.
public DavPropertyResult doSearch(org.apache.jackrabbit.webdav.search.SearchInfo searchInfo)
throws DAVException,
java.rmi.RemoteException
doSearch in interface DAVResourceInterfacesearchInfo - The search criteria.
DavPropertyResult which has the DAV properties which were returned by the property find method.
DAVException - in the case of server failures.
java.rmi.RemoteException - in the case of network failures.
public void setContents(byte[] contents)
throws DAVException,
java.rmi.RemoteException
setContents in interface DAVResourceInterfacecontents - The byte array containing the content for this DAV resource.
DAVException - in the event of a WebDAV failure.
java.rmi.RemoteException - in the event of network failure.
public void setContents(java.net.URL url)
throws DAVException,
java.rmi.RemoteException
setContents in interface DAVResourceInterfaceurl - A URL that represents the content for this DAV resource.
DAVException - in the event of a WebDAV failure.
java.rmi.RemoteException - in the event of network failure.
public void setContents(java.lang.String content)
throws DAVException,
java.rmi.RemoteException
setContents in interface DAVResourceInterfacecontent - The string containing the content for this DAV resource.
DAVException - in the event of a WebDAV failure.
java.rmi.RemoteException - in the event of network failure.
public void setContents(java.io.InputStream is)
throws DAVException,
java.rmi.RemoteException
InputStreamAdapter.
setContents in interface DAVResourceInterfaceis - An input stream representing the content for this DAV resource.
DAVException - in the event of a WebDAV failure.
java.rmi.RemoteException - in the event of network failure.
public void setContentType(java.lang.String contentType)
throws DAVException,
java.rmi.RemoteException
setContentType in interface DAVResourceInterfacecontentType - The content type for this DAV resource.
DAVException - in the event of a WebDAV failure.
java.rmi.RemoteException - in the event of network failure.DAVResourceInterface.contentType(),
DAVResourceInterface.getContentType()
public void setProperties(org.w3c.dom.Element[] elems)
throws DAVException,
java.rmi.RemoteException
setProperties in interface DAVResourceInterfaceelems - An array of properties to be set on this DAV resource.
DAVException - in the event of a WebDAV failure.
java.rmi.RemoteException - in the event of network failure.
public void setProperties(PropertyName[] propNames,
java.lang.String[] propValues)
throws DAVException,
java.rmi.RemoteException
setProperties in interface DAVResourceInterfacepropNames - An array of property names to be set on this DAV resource.propValues - An array of property values to be set on this DAV resource.
DAVException - in the event of a WebDAV failure.
java.rmi.RemoteException - in the event of network failure.
public void setProperties(org.w3c.dom.DocumentFragment props)
throws DAVException,
java.rmi.RemoteException
setProperties in interface DAVResourceInterfaceprops - An XML document fragment that defines the properties to be set on this DAV resource.
DAVException - in the event of a WebDAV failure.
java.rmi.RemoteException - in the event of network failure.
public void setProperty(PropertyName propName,
java.lang.String propValue)
throws DAVException,
java.rmi.RemoteException
setProperty in interface DAVResourceInterfacepropName - An property name to be set on this DAV resource.propValue - A property value to be set on this DAV resource.
DAVException - in the event of a WebDAV failure.
java.rmi.RemoteException - in the event of network failure.
public void setProperty(org.w3c.dom.Element prop)
throws DAVException,
java.rmi.RemoteException
setProperty in interface DAVResourceInterfaceprop - An XML element that represents a property to be set on this DAV resource.
DAVException - in the event of a WebDAV failure.
java.rmi.RemoteException - in the event of network failure.
public void unlock()
throws DAVException,
java.rmi.RemoteException
unlock in interface DAVResourceInterfaceDAVException - in the event of a WebDAV failure.
java.rmi.RemoteException - in the event of network failure.
public void unlock(java.lang.String lockToken)
throws DAVException,
java.rmi.RemoteException
locktoken.
unlock in interface DAVResourceInterfacelockToken - The lock token for this DAV resource.
DAVException - in the event of a WebDAV failure.
java.rmi.RemoteException - in the event of network failure.public boolean getOverwrite()
getOverwrite in interface DAVResourceInterfacetrue if the overwrite flag is set, false otherwisepublic void setOverwrite(boolean overwrite)
setOverwrite in interface DAVResourceInterfaceoverwrite - The value of the overwrite flag to set on the resource.public void setUserName(java.lang.String userName)
userName - user namepublic void setPassword(java.lang.String password)
password - passwordpublic void setDebug(int debug)
debug - The debug setting
public void setDepth(int depth)
throws DAVException,
java.rmi.RemoteException
DavConstants.DEPTH_0DavConstants.DEPTH_1DavConstants.DEPTH_INFINITY
setDepth in interface DAVResourceInterfacedepth - The depth on which DAV operations will be based. Specify one of DavConstants.DEPTH_0 or DavConstants.DEPTH_1 or DavConstants.DEPTH_INFINITY.
DAVException - in the event of a WebDAV failure.
java.rmi.RemoteException - in the event of network failure.public int getDepth()
DavConstants.DEPTH_0DavConstants.DEPTH_1DavConstants.DEPTH_INFINITY
getDepth in interface DAVResourceInterface
public java.util.Properties doOptions()
throws DAVException,
java.rmi.RemoteException
status, allowedMethods and davCapabilities are also updated.
DAVException - if unable to get the DAV options.
java.rmi.RemoteException - if a communications-related exception occurs.public java.lang.String[] getAllowedMethods()
public java.lang.String[] getDavCapabilities()
protected boolean isAuthReqd()
public boolean SUCCEEDED()
throws java.rmi.RemoteException
SUCCEEDED in interface DAVResourceInterfacetrue if last method was successful, false otherwise.
java.rmi.RemoteException - in the case of network failures.protected static boolean SUCCEEDED(int statusCode)
public java.util.Map getMultiStatus()
public void close()
throws java.rmi.RemoteException
close in interface DAVResourceInterfacejava.rmi.RemoteException - in the event of network failure.
public void setTempDir(java.lang.String tempDir)
throws java.rmi.RemoteException
java.io.tmp system property can be used to set this value
at JVM invocation. If the system property is not set "/temp/" is the
default, but can be overridden with this method.
setTempDir in interface DAVResourceInterfacetempDir - Temporary directory for temporary files.
java.rmi.RemoteException - in the event of network failure.
public java.lang.String getTempDir()
throws java.rmi.RemoteException
getTempDir in interface DAVResourceInterfacejava.rmi.RemoteException - in the event of network failure.
public boolean exists()
throws java.rmi.RemoteException
exists in interface DAVResourceInterfacetrue if resource exists, false otherwise.
java.rmi.RemoteException - in the event of network failure.
public DavPropertyResult doReport(org.apache.jackrabbit.webdav.version.report.ReportInfo reportInfo)
throws DAVException
ReportInfo parameter specifies the following information.
doReport in interface DAVResourceInterfacereportInfo - Information which specifies the desired report.
DavPropertyResult which has the DAV properties which were returned by the property report method.
DAVException - in the case of server failures.
public java.lang.String getACL()
throws DAVException,
java.rmi.RemoteException
getACL in interface DAVResourceInterfaceDAVException - in the event of a WebDAV failure.
java.rmi.RemoteException - in the event of network failure.DAVResourceInterface.getAcl(),
DAVResourceInterface.setACL(String)
public com.sas.services.webdav.Acl getAcl()
throws DAVException,
java.rmi.RemoteException
getAcl in interface DAVResourceInterfaceDAVException - in the case of a WebDAV error.
java.rmi.RemoteException - in the case of network failures.DAVResourceInterface.getACL(),
DAVResourceInterface.setAcl(Acl)
public java.lang.String setACL(java.lang.String acl)
throws DAVException,
java.rmi.RemoteException
setACL in interface DAVResourceInterfaceacl - An XML serialized document describing the ACL for this DAV resource.
null if there was no response document.
DAVException - in the event of a WebDAV failure.
java.rmi.RemoteException - in the event of network failure.DAVResourceInterface.getACL()
public java.lang.String setAcl(com.sas.services.webdav.Acl acl)
throws DAVException,
java.rmi.RemoteException
setAcl in interface DAVResourceInterfaceacl - The access control list to set for this DAV resource.
null if there was no response document.
DAVException - in the case of a WebDAV error.
java.rmi.RemoteException - in the case of network failures.DAVResourceInterface.getAcl()public void setPath(java.lang.String path)
setPath in interface DAVResourceInterfacepath - The new path for the WebDAV resource.public java.lang.String getPath()
getPath in interface DAVResourceInterface
public void doControl()
throws DAVException,
java.rmi.RemoteException
doControl in interface DAVResourceInterfaceDAVException - in the case of a WebDAV error.
java.rmi.RemoteException - in the case of network failures.
public java.util.List getPreviousVersionNames()
throws DAVException,
java.rmi.RemoteException
getPreviousVersionNames in interface DAVResourceInterfaceDAVException - in the case of a WebDAV error.
java.rmi.RemoteException - in the case of network failures.
public void doCheckout()
throws DAVException,
java.rmi.RemoteException
doCheckout in interface DAVResourceInterfaceDAVException - in the case of a WebDAV error.
java.rmi.RemoteException - in the case of network failures.
public void doLabel(int labelAction,
java.lang.String label)
throws DAVException,
java.rmi.RemoteException
doLabel in interface DAVResourceInterfacelabelAction - Specifies the action which is to be executed.
LabelInfo#TYPE_SETLabelInfo#TYPE_REMOVELabelInfo#TYPE_ADDlabel - The value of the label.
DAVException - in the case of a WebDAV error.
java.rmi.RemoteException - in the case of network failures.DAVResourceInterface.doLabel(int, String, int)
public void doLabel(int labelAction,
java.lang.String label,
int depth)
throws DAVException,
java.rmi.RemoteException
doLabel in interface DAVResourceInterfacelabelAction - Specifies the action which is to be executed.
LabelInfo#TYPE_SETLabelInfo#TYPE_REMOVELabelInfo#TYPE_ADDlabel - The value of the label.depth - The depth.
DAVException - in the case of a WebDAV error.
java.rmi.RemoteException - in the case of network failures.DAVResourceInterface.doLabel(int, String)
public void doCheckin()
throws DAVException,
java.rmi.RemoteException
doCheckin in interface DAVResourceInterfaceDAVException - in the case of a WebDAV error.
java.rmi.RemoteException - in the case of network failures.
public void doUncheckout()
throws DAVException,
java.rmi.RemoteException
doUncheckout in interface DAVResourceInterfaceDAVException - in the case of a WebDAV error.
java.rmi.RemoteException - in the case of network failures.
public com.sas.services.webdav.Version getCheckedIn()
throws DAVException,
java.rmi.RemoteException
getCheckedIn in interface DAVResourceInterfaceDAVException - in the case of a WebDAV error.
java.rmi.RemoteException - in the case of network failures.
public com.sas.services.webdav.Version getCheckedOut()
throws DAVException,
java.rmi.RemoteException
getCheckedOut in interface DAVResourceInterfaceDAVException - in the case of a WebDAV error.
java.rmi.RemoteException - in the case of network failures.
public com.sas.services.webdav.Version getVersion(java.lang.String versionName)
throws DAVException
getVersion in interface DAVResourceInterfaceversionName - Which version to retrieve for this DAV resource.
DAVException - in the case of a WebDAV error.public void setExistsRequirement(int requirement)
setExistsRequirement in interface DAVResourceInterfacerequirement - 0 if we don't care or 1 if it must exist or 2 if it must not exist.public int getExistsRequirement()
getExistsRequirement in interface DAVResourceInterface0 if we don't care or 1 if it must exist or 2 if it must not exist.public java.util.List<java.lang.String> getChildrenList(java.lang.String path)
getChildrenList in interface DAVResourceInterfacepath - The path of this DAV resource.
public java.util.Map<java.lang.String,PropertyMap> getChildrenProperties(PropertyName[] properties)
throws DAVException,
java.rmi.RemoteException
DAVException - in the case of a WebDAV error.
java.rmi.RemoteException - in the case of a network error.public static java.lang.String extractPath(java.lang.String url)
url - The URL from which the path should be extracted
public static java.lang.String unencodePath(java.lang.String path)
path - The URL from which the path should be extracted.
public PropertyMap getPropertyMap()
throws java.rmi.RemoteException,
DAVException
DAVException - in the event of WebDAV errors
java.rmi.RemoteException - in the case of network errors
|
| Foundation |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||