|
Foundation |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.services.webdav.DAVResource
public class DAVResource
A DAVResource represents a WebDAV (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), userid, password, proxy host, proxy port, proxy userid, 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 c = new ConnectionInfo("http://http-server/path-to-resource", "user", "pwd"); // proxy information, if required c.setProxyHost("myproxy.com"); c.setProxyPort(3100); DAVResource r1 = new DAVResource(c, logger); r1.setProperty(...); if (r1.getStatusCode() != 200) out.println(r1.getStatusMessage()); } catch (DAVException e) { e.printStackTrace(); }In order to create a collection use the longer form of the constructor. For example,
DAVResource r2 = new DAVResource(c, true, logger);this will ensure that r2 is a collection resource (it may contain other resources). Alternatively do this in two steps
DAVResource r2 = new DAVResource(c, logger); r2.makeCollection();
Field Summary | |
---|---|
static int |
DONT_CARE
|
static int |
MUST_EXIST
|
static int |
MUST_NOT_EXIST
|
Constructor Summary | |
---|---|
DAVResource(ConnectionInfo cInfo)
Create a DAVResource using the connection information. |
|
DAVResource(ConnectionInfo cInfo,
boolean createCollection)
Create a DAVResource using the connection information. |
|
DAVResource(ConnectionInfo cInfo,
boolean createCollection,
java.lang.Object logger)
Deprecated. As of release 9.3, replaced by DAVResource(ConnectionInfo, boolean) |
|
DAVResource(ConnectionInfo cInfo,
java.lang.Object logger)
Deprecated. As of release 9.3, replaced by DAVResource(ConnectionInfo) |
|
DAVResource(java.lang.String url)
Create a DAVResource using a string URL. |
|
DAVResource(java.lang.String url,
boolean createCollection)
Create a DAVResource using a string URL and boolean flag to indicate whether a collection should be created or not. |
|
DAVResource(java.lang.String url,
boolean createCollection,
java.lang.String userName,
java.lang.String password)
Deprecated. As of release 9.3, replaced by DAVResource(ConnectionInfo, boolean) |
|
DAVResource(java.lang.String url,
boolean createCollection,
java.lang.String userName,
java.lang.String password,
java.lang.Object logger)
Deprecated. As of release 9.3, replaced by DAVResource(ConnectionInfo, boolean) |
|
DAVResource(java.lang.String url,
java.lang.Object logger)
Deprecated. As of release 9.3, replaced by DAVResource(String) |
|
DAVResource(java.lang.String url,
java.lang.String userName,
java.lang.String password)
Create a DAVResource using a string URL, userName and password. |
|
DAVResource(java.lang.String url,
java.lang.String userName,
java.lang.String password,
java.lang.Object logger)
Deprecated. As of release 9.3, replaced by DAVResource(String, String, String) |
|
DAVResource(java.net.URL url)
Create a DAVResource using a Java URL. |
Method Summary | |
---|---|
void |
close()
Close the connection used by this DAVResource |
DAVResource |
copy(java.lang.String targetPath)
Copy resource to the target path on the same host as the source. |
void |
delete()
Deletes the current resource. |
protected org.apache.webdav.lib.WebdavState |
discoverLock(java.lang.String owner,
java.lang.String path,
org.apache.webdav.lib.WebdavState state)
Discover the given owner and locktoken and set the locktoken |
void |
doCheckin()
Check in this resource. |
void |
doCheckout()
Checks out this resource. |
void |
doControl()
Puts the resource until version control. |
void |
doLabel(int labelAction,
java.lang.String label)
Modify the version label on the resource (if this is supported by the server). |
java.util.Properties |
doOptions()
|
void |
doUncheckout()
Uncheckout this resource, cancelling a previous checkout. |
boolean |
exists()
Returns whether the resource exists or not |
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()
Get the Access Control List for this resource. |
java.lang.String |
getACL()
Get the Access Control List for this resource. |
org.apache.webdav.lib.Lock |
getActiveLockFor(java.lang.String owner)
Get an active lock, if it exists, for the owner |
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 |
getChildrenList(java.lang.String path)
Get a list of children. |
java.util.Map |
getChildrenProperties(PropertyName[] properties)
Get all the properties of a collection's members (depth=1) in as single server request. |
byte[] |
getContents()
Returns the contents of the resource as a byte array. |
void |
getContents(java.io.File fileData)
Returns the contents of the resource into the supplied file. |
java.lang.String |
getContentsAsString()
Return the contents of the resource as a String. |
java.io.InputStream |
getContentsInputStream()
Returns the contents of the resource as an InputStream |
java.lang.String |
getContentType()
Return the content type of the content for this resource |
java.util.Set |
getCurrentUserPrivilegeSet()
Get a the current list of privileges this user has for this resource. |
java.lang.String[] |
getDavCapabilities()
Returns a list of DAV capabilties. |
int |
getDepth()
Get the value for depth. |
int |
getExistsRequirement()
|
org.apache.log4j.Logger |
getLogger()
Returns the logger currently being used by DAVResource. |
java.util.Map |
getMultiStatus()
Return the multistatus information for the last operation. |
boolean |
getOverwrite()
Get value for overWrite |
java.lang.String |
getPath()
Get 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 resource. |
org.apache.webdav.lib.Property[] |
getProperties()
Returns all the properties on the DAV resource |
org.apache.webdav.lib.Property[] |
getProperties(org.w3c.dom.Element[] propNames)
Returns all the properties specified in the parameter on the DAV resource |
org.apache.webdav.lib.Property[] |
getProperties(PropertyName[] propNames)
Returns all the properties specified in the parameter on the DAV resource |
org.apache.webdav.lib.Property[] |
getProperties(java.lang.String propNames)
Returns properties for a given set of property names. |
org.apache.webdav.lib.Property[] |
getProperty(org.w3c.dom.Element propName)
Returns the property specified in the parameter on the DAV resource |
org.apache.webdav.lib.Property[] |
getProperty(PropertyName propName)
Returns a property for a given property name. |
org.apache.webdav.lib.Property[] |
getProperty(java.lang.String propName)
Returns a property for a given property name. |
PropertyMap |
getPropertyMap()
Returns a property map of the resources properties. |
org.apache.webdav.lib.Property[] |
getPropertyNames()
Returns a list of property names for the resource |
int |
getStatusCode()
Returns the status code for the last operation |
java.lang.String |
getStatusMessage()
Returns the status message for the last operation. |
com.sas.services.webdav.TreeNode |
getSupportedPrivilegeSet()
Get a list of privileges that apply to this resource. |
java.lang.String |
getTempDir()
Gets the current value of the directory used for temporary files. |
java.net.URL |
getURL()
Returns the URL that this DAV Resource represents |
com.sas.services.webdav.Version |
getVersion(java.lang.String versionName)
Gets a particular version of this resource |
protected boolean |
isAuthReqd()
Returns whether a password is required to connect to this server |
boolean |
isCollection()
Returns whether this resource is a collection or not |
boolean |
isLocked()
Returns whether this resource is locked or not |
java.lang.String |
lock()
Locks the resource |
boolean |
makeCollection()
Make a collection. |
DAVResource |
move(java.lang.String targetPath)
Move this resource to another location (path) on the same server as the source. |
void |
removeProperties(org.w3c.dom.Element[] props)
Remove/delete properties from a resource |
void |
removeProperties(PropertyName[] props)
Remove/delete properties from a resource |
void |
removeProperty(org.w3c.dom.Element prop)
Remove/delete properties from a resource |
void |
removeProperty(PropertyName prop)
Remove/delete a property from a resource |
void |
removeProperty(java.lang.String prop)
Remove/delete properties from a resource |
org.apache.webdav.lib.Property[] |
report(java.lang.String body)
Run a report on the current resource. |
org.apache.webdav.lib.Property[] |
search(org.w3c.dom.Element searchQuery)
The SEARCH method invokes one of the implemented search grammars on the server to evaluate the query. |
org.apache.webdav.lib.Property[] |
search(java.lang.String searchString)
The SEARCH method invokes one of the implemented search grammars on the server to evaluate the query. |
java.lang.String |
setAcl(com.sas.services.webdav.Acl acl)
Set/Update the Access Control List for this resource. |
java.lang.String |
setACL(java.lang.String acl)
Set/Update the Access Control List for this resource. |
void |
setContents(byte[] contents)
Provide content for the resource. |
void |
setContents(java.io.InputStream is)
Set the content from an InputStream. |
void |
setContents(java.lang.String content)
Set the contents of the resource, passing in a URL |
void |
setContents(java.net.URL url)
Set the content for the resource from an URL |
void |
setContentType(java.lang.String contentType)
Set the contents type for the content of the resource |
void |
setDebug(int debug)
Set the value for debug. |
void |
setDepth(int depth)
Set the value for depth. |
void |
setEscapedPath(java.lang.String escapedPath)
Set the path for this resource using an escaped string. |
void |
setExistsRequirement(int requirement)
|
void |
setLogger(java.lang.Object logger)
This method no longer has any effect. |
void |
setOverwrite(boolean overwrite)
Set the value for overWrite |
void |
setPassword(java.lang.String password)
Set the value for password. |
void |
setPath(java.lang.String path)
Set the path for this resource. |
void |
setPathNoAction(java.lang.String path)
Deprecated. |
void |
setProperties(org.w3c.dom.DocumentFragment doc)
Set properties on the resource |
void |
setProperties(org.w3c.dom.Element[] elems)
Set properties on the resource |
void |
setProperties(PropertyName[] props,
java.lang.String[] propValues)
Set properties on the resource |
void |
setProperty(org.w3c.dom.Element elem)
Set a property on the resource |
void |
setProperty(PropertyName prop,
java.lang.String propValue)
Set a property on the resource |
void |
setSessionContext(java.lang.Object sessionContext)
Deprecated. |
void |
setTempDir(java.lang.String tempDir)
Sets the temp directory used for storing 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)
Returns whether the statusCode parameter represents success or not. |
static java.lang.String |
unencodePath(java.lang.String path)
Unencode the path. |
void |
unlock()
Unlock a resource |
void |
unlock(java.lang.String lockToken)
Unlock a resource |
Field Detail |
---|
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
url
- URL for the resource.
DAVException
- if a DAV Server error occurs.public DAVResource(java.lang.String url, java.lang.Object logger) throws DAVException
DAVResource(String)
url
- URL for the resourcelogger
- This is ignored since we no longer use Logging Service.
DAVException
- if a DAV Server error occurs.public DAVResource(java.lang.String url, java.lang.String userName, java.lang.String password) throws DAVException
url
- URL for the resourceuserName
- authentication user namepassword
- password for authentication
DAVException
- if a DAV Server error occurs.public DAVResource(java.lang.String url, java.lang.String userName, java.lang.String password, java.lang.Object logger) throws DAVException
DAVResource(String, String, String)
url
- URL for the resourceuserName
- authentication user namepassword
- password for authenticationlogger
- This is ignored since we no longer use Logging Service.
DAVException
- if a DAV Server error occurs.public DAVResource(java.net.URL url) throws DAVException
url
- URL for the resource
DAVException
- if a DAV Server error occurs.public DAVResource(java.lang.String url, boolean createCollection) throws DAVException
url
- URL for the resourcecreateCollection
- The URL indicates a collection resource
DAVException
- if a DAV Server error occurs.public DAVResource(java.lang.String url, boolean createCollection, java.lang.String userName, java.lang.String password) throws DAVException
DAVResource(ConnectionInfo, boolean)
url
- URL for the resourcecreateCollection
- create a DAV collection if trueuserName
- authentication user namepassword
- password for authentication
DAVException
- if a DAV Server error occurs.public DAVResource(java.lang.String url, boolean createCollection, java.lang.String userName, java.lang.String password, java.lang.Object logger) throws DAVException
DAVResource(ConnectionInfo, boolean)
url
- URL for the resourcecreateCollection
- create a DAV collection if trueuserName
- authentication user namepassword
- password for authenticationlogger
- This is ignored.
DAVException
- if a DAV Server error occurs.public DAVResource(ConnectionInfo cInfo, java.lang.Object logger) throws DAVException
DAVResource(ConnectionInfo)
cInfo
- The connection information for the resourcelogger
- Ignored since we no longer use Logging Service.
DAVException
- if a DAV Server error occurs.public DAVResource(ConnectionInfo cInfo, boolean createCollection, java.lang.Object logger) throws DAVException
DAVResource(ConnectionInfo, boolean)
cInfo
- The connection information for the resourcecreateCollection
- create a DAV collection if truelogger
- ignored since we no longer use Logging Service.
DAVException
- if a DAV Server error occurs.public DAVResource(ConnectionInfo cInfo) throws DAVException
cInfo
- The connection information for the resource
DAVException
- if a DAV Server error occurs.public DAVResource(ConnectionInfo cInfo, boolean createCollection) throws DAVException
cInfo
- The connection information for the resourcecreateCollection
- create a DAV collection if true
DAVException
- if a DAV Server error occurs.Method Detail |
---|
public boolean makeCollection() throws DAVException
makeCollection
in interface DAVResourceInterface
DAVException
- in the case of server failurespublic DAVResource copy(java.lang.String targetPath) throws DAVException, java.rmi.RemoteException
copy
in interface DAVResourceInterface
targetPath
- The path to which current resource is to be copied.
DAVException
- in the case of server failures
java.rmi.RemoteException
- in the case of network failurespublic void delete() throws DAVException, java.rmi.RemoteException
delete
in interface DAVResourceInterface
DAVException
- in the case of server failures
java.rmi.RemoteException
- in the case of network failurespublic org.apache.webdav.lib.Lock getActiveLockFor(java.lang.String owner) throws DAVException
DAVResourceInterface
getActiveLockFor
in interface DAVResourceInterface
owner
- The owner for which the lock is being sought
DAVException
- in the event of a WebDAV failure.public byte[] getContents() throws DAVException, java.rmi.RemoteException
getContents
in interface DAVResourceInterface
DAVException
- in the event of WebDAV errors
java.rmi.RemoteException
- in the case of network errorspublic java.lang.String getContentsAsString() throws DAVException, java.rmi.RemoteException
getContentsAsString
in interface DAVResourceInterface
DAVException
- 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 DAVResourceInterface
fileData
- The file to which the contents of the resource should be written
DAVException
- in the case of a WebDAV error
java.rmi.RemoteException
- in the case of a network failurepublic java.io.InputStream getContentsInputStream() throws DAVException, java.rmi.RemoteException
getContentsInputStream
in interface DAVResourceInterface
DAVException
- in the case of a WebDAV error
java.rmi.RemoteException
- in the case of a network failurepublic java.lang.String getContentType() throws DAVException, java.rmi.RemoteException
getContentType
in interface DAVResourceInterface
DAVException
- in the event of a WebDAV failure.
java.rmi.RemoteException
- in the event of network failure.public org.apache.webdav.lib.Property[] getProperties() throws DAVException, java.rmi.RemoteException
getProperties
in interface DAVResourceInterface
DAVException
- in the case of server failures
java.rmi.RemoteException
- in the case of network failurespublic org.apache.webdav.lib.Property[] getProperty(org.w3c.dom.Element propName) throws DAVException, java.rmi.RemoteException
getProperty
in interface DAVResourceInterface
propName
- property name elements - specifying which property value should be returned
DAVException
- in the case of server failures
java.rmi.RemoteException
- in the case of network failurespublic org.apache.webdav.lib.Property[] getProperties(org.w3c.dom.Element[] propNames) throws DAVException, java.rmi.RemoteException
getProperties
in interface DAVResourceInterface
propNames
- Array of property name elements - specifying which property values should be returned
DAVException
- in the case of server failures
java.rmi.RemoteException
- in the case of network failurespublic org.apache.webdav.lib.Property[] getProperty(PropertyName propName) throws DAVException, java.rmi.RemoteException
getProperty
in interface DAVResourceInterface
propName
- name of property for which value should be returned
DAVException
- in the case of server failures
java.rmi.RemoteException
- in the case of network failurespublic org.apache.webdav.lib.Property[] getProperties(PropertyName[] propNames) throws DAVException, java.rmi.RemoteException
getProperties
in interface DAVResourceInterface
propNames
- Array of property names, specifying which property values should be returned
DAVException
- in the case of server failures
java.rmi.RemoteException
- in the case of network failurespublic org.apache.webdav.lib.Property[] getProperty(java.lang.String propName) throws DAVException, java.rmi.RemoteException
getProperty
in interface DAVResourceInterface
propName
- name of property for which value should be returned
DAVException
- in the case of server failures
java.rmi.RemoteException
- in the case of network failurespublic org.apache.webdav.lib.Property[] getProperties(java.lang.String propNames) throws DAVException, java.rmi.RemoteException
getProperties
in interface DAVResourceInterface
propNames
- names of properties for which values should be returned
DAVException
- in the case of server failures
java.rmi.RemoteException
- in the case of network failurespublic org.apache.webdav.lib.Property[] getPropertyNames() throws DAVException, java.rmi.RemoteException
getPropertyNames
in interface DAVResourceInterface
DAVException
- in the case of server failures
java.rmi.RemoteException
- in the case of network failurespublic int getStatusCode() throws DAVException, java.rmi.RemoteException
getStatusCode
in interface DAVResourceInterface
DAVException
- in the case of server failures
java.rmi.RemoteException
- in the case of network failurespublic java.lang.String getStatusMessage()
getStatusMessage
in interface DAVResourceInterface
public java.net.URL getURL() throws DAVException, java.rmi.RemoteException
getURL
in interface DAVResourceInterface
DAVException
- in the case of server failures
java.rmi.RemoteException
- in the case of network failurespublic boolean isCollection() throws DAVException, java.rmi.RemoteException
isCollection
in interface DAVResourceInterface
DAVException
- in the case of server failures
java.rmi.RemoteException
- in the case of network failurespublic boolean isLocked() throws DAVException, java.rmi.RemoteException
isLocked
in interface DAVResourceInterface
DAVException
- in the case of server failures
java.rmi.RemoteException
- in the case of network failurespublic java.lang.String lock() throws DAVException, java.rmi.RemoteException
lock
in interface DAVResourceInterface
DAVException
- in the case of server failures
java.rmi.RemoteException
- in the case of network failurespublic DAVResource move(java.lang.String targetPath) throws DAVException, java.rmi.RemoteException
move
in interface DAVResourceInterface
targetPath
- The target path where the resource will be moved
DAVException
- in the case of server failures
java.rmi.RemoteException
- in the case of network failurespublic void removeProperties(PropertyName[] props) throws DAVException, java.rmi.RemoteException
removeProperties
in interface DAVResourceInterface
props
- names of the properties to remove
DAVException
- in the case of server failures
java.rmi.RemoteException
- in the case of network failurespublic void removeProperties(org.w3c.dom.Element[] props) throws DAVException, java.rmi.RemoteException
removeProperties
in interface DAVResourceInterface
props
- names of the properties to remove
DAVException
- in the case of server failures
java.rmi.RemoteException
- in the case of network failurespublic void removeProperty(org.w3c.dom.Element prop) throws DAVException, java.rmi.RemoteException
removeProperty
in interface DAVResourceInterface
prop
- property to remove
DAVException
- in the case of server failures
java.rmi.RemoteException
- in the case of network failurespublic void removeProperty(java.lang.String prop) throws DAVException, java.rmi.RemoteException
removeProperty
in interface DAVResourceInterface
prop
- property to remove
DAVException
- in the case of server failures
java.rmi.RemoteException
- in the case of network failurespublic void removeProperty(PropertyName prop) throws DAVException, java.rmi.RemoteException
removeProperty
in interface DAVResourceInterface
prop
- name of the property to remove
DAVException
- in the case of server failures
java.rmi.RemoteException
- in the case of network failurespublic org.apache.webdav.lib.Property[] search(java.lang.String searchString) throws DAVException, java.rmi.RemoteException
search
in interface DAVResourceInterface
searchString
- A string in the correct format for the grammar selected. This will be passed to the
server in the body of the of the SEARCH method.
DAVException
- in the case of server failures
java.rmi.RemoteException
- in the case of network failurespublic org.apache.webdav.lib.Property[] search(org.w3c.dom.Element searchQuery) throws DAVException, java.rmi.RemoteException
search
in interface DAVResourceInterface
searchQuery
- An XML representation of the query
DAVException
- in the case of server failures
java.rmi.RemoteException
- in the case of network failurespublic void setContents(byte[] contents) throws DAVException, java.rmi.RemoteException
setContents
in interface DAVResourceInterface
contents
- byte array for the resource contents
DAVException
- in the case of server failures
java.rmi.RemoteException
- in the case of network failurespublic void setContents(java.net.URL url) throws DAVException, java.rmi.RemoteException
setContents
in interface DAVResourceInterface
url
- The URL for the contents to be PUT to this resource
DAVException
- in the case of server failures
java.rmi.RemoteException
- in the case of network failurespublic void setContents(java.lang.String content) throws DAVException, java.rmi.RemoteException
setContents
in interface DAVResourceInterface
content
- The string containing the content for this 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 DAVResourceInterface
is
- The input stream that contains the content.
DAVException
- in the case of a WebDAV error
java.rmi.RemoteException
- in the case of a network failurepublic void setContentType(java.lang.String contentType) throws DAVException, java.rmi.RemoteException
setContentType
in interface DAVResourceInterface
contentType
- The content type for this resource
DAVException
- in the event of a WebDAV failure.
java.rmi.RemoteException
- in the event of network failure.public void setProperties(org.w3c.dom.Element[] elems) throws DAVException, java.rmi.RemoteException
setProperties
in interface DAVResourceInterface
elems
- an array of DOM2 elements that identify the properties to set on the resource
DAVException
- in the case of server failures
java.rmi.RemoteException
- in the case of network failurespublic void setProperties(PropertyName[] props, java.lang.String[] propValues) throws DAVException, java.rmi.RemoteException
setProperties
in interface DAVResourceInterface
props
- property namespropValues
- property values (which will be escaped unless it is a CDATA section)
DAVException
- in the case of server failures
java.rmi.RemoteException
- in the case of network failurespublic void setProperties(org.w3c.dom.DocumentFragment doc) throws DAVException, java.rmi.RemoteException
setProperties
in interface DAVResourceInterface
doc
- document fragment containing elements that represent the properties to be set on the resource
DAVException
- in the case of server failures
java.rmi.RemoteException
- in the case of network failurespublic void setProperty(PropertyName prop, java.lang.String propValue) throws DAVException, java.rmi.RemoteException
setProperty
in interface DAVResourceInterface
prop
- name of the propertypropValue
- value of the property (which will be escaped unless it is a CDATA section)
DAVException
- in the case of server failures
java.rmi.RemoteException
- in the case of network failurespublic void setProperty(org.w3c.dom.Element elem) throws DAVException, java.rmi.RemoteException
setProperty
in interface DAVResourceInterface
elem
- an XML element that represents the property name and value
DAVException
- in the case of server failures
java.rmi.RemoteException
- in the case of network failurespublic void unlock() throws DAVException, java.rmi.RemoteException
unlock
in interface DAVResourceInterface
DAVException
- in the case of server failures
java.rmi.RemoteException
- in the case of network failurespublic void unlock(java.lang.String lockToken) throws DAVException, java.rmi.RemoteException
unlock
in interface DAVResourceInterface
lockToken
- The lock token for the resource
DAVException
- in the case of server failures
java.rmi.RemoteException
- in the case of network failurespublic boolean getOverwrite()
getOverwrite
in interface DAVResourceInterface
public void setOverwrite(boolean overwrite)
setOverwrite
in interface DAVResourceInterface
overwrite
- Overwrite flagpublic void setUserName(java.lang.String userName)
userName
- user namepublic void setPassword(java.lang.String password)
password
- passwordpublic void setDebug(int debug)
debug
- The debug settingpublic void setDepth(int depth) throws DAVException, java.rmi.RemoteException
setDepth
in interface DAVResourceInterface
depth
- org.apache.webdav.lib.methods.DepthSupport
DAVException
- in the case of server failures
java.rmi.RemoteException
- in the case of network failurespublic int getDepth()
getDepth
in interface DAVResourceInterface
public java.util.Properties doOptions() throws DAVException, java.rmi.RemoteException
DAVException
java.rmi.RemoteException
public java.lang.String[] getAllowedMethods()
public java.lang.String[] getDavCapabilities()
protected boolean isAuthReqd()
public boolean SUCCEEDED() throws java.rmi.RemoteException
SUCCEEDED
in interface DAVResourceInterface
java.rmi.RemoteException
- in the case of network failuresprotected static boolean SUCCEEDED(int statusCode)
statusCode
- A status code to be checked for success or failure
statusCode
is successful, false otherwisepublic void setLogger(java.lang.Object logger)
logger
- The logger.public org.apache.log4j.Logger getLogger()
Logger
The logger that is currently being usedpublic java.util.Map getMultiStatus()
public void close() throws java.rmi.RemoteException
close
in interface DAVResourceInterface
java.rmi.RemoteException
- in the case of network failurespublic void setTempDir(java.lang.String tempDir) throws java.rmi.RemoteException
java.io.tmpdir
, but if required can be
changed for a particular instance using this method.
setTempDir
in interface DAVResourceInterface
tempDir
- The directory to be used for temporary files
java.rmi.RemoteException
- in the case of network failurespublic java.lang.String getTempDir() throws java.rmi.RemoteException
java.io.tmpdir
, but may have been changed.
getTempDir
in interface DAVResourceInterface
java.rmi.RemoteException
- in the case of network failurespublic boolean exists() throws java.rmi.RemoteException
exists
in interface DAVResourceInterface
java.rmi.RemoteException
- in the case of network failurespublic org.apache.webdav.lib.Property[] report(java.lang.String body) throws DAVException, java.rmi.RemoteException
report
in interface DAVResourceInterface
body
- An XML document string that represents the report
request
DAVException
- in the case of server failures
java.rmi.RemoteException
- in the case of network failurespublic java.lang.String getACL() throws DAVException, java.rmi.RemoteException
getACL
in interface DAVResourceInterface
DAVException
- in the case of server failures
java.rmi.RemoteException
- in the case of network failurespublic com.sas.services.webdav.Acl getAcl() throws DAVException, java.rmi.RemoteException
getAcl
in interface DAVResourceInterface
DAVException
- in the case of server failures
java.rmi.RemoteException
- in the case of network failurespublic java.lang.String setACL(java.lang.String acl) throws DAVException, java.rmi.RemoteException
setACL
in interface DAVResourceInterface
acl
- An XML serialized document describing the ACL for this resource
DAVException
- in the case of server failures
java.rmi.RemoteException
- in the case of network failurespublic java.lang.String setAcl(com.sas.services.webdav.Acl acl) throws DAVException, java.rmi.RemoteException
setAcl
in interface DAVResourceInterface
acl
- An Acl object describing the ACL for this resource
DAVException
- in the case of server failures
java.rmi.RemoteException
- in the case of network failurespublic void setSessionContext(java.lang.Object sessionContext) throws java.rmi.RemoteException
setSessionContext
in interface DAVResourceInterface
sessionContext
- The session context to set
java.rmi.RemoteException
- in the event of a network failurepublic void setPath(java.lang.String path)
setPath
in interface DAVResourceInterface
path
- The new path for the WebDAV resourcepublic void setEscapedPath(java.lang.String escapedPath)
setEscapedPath
in interface DAVResourceInterface
escapedPath
- The new encoded path for the WebDAV resourcepublic void setPathNoAction(java.lang.String path)
DAVResourceInterface
setPathNoAction
in interface DAVResourceInterface
path
- The pathpublic java.lang.String getPath()
getPath
in interface DAVResourceInterface
public void doControl() throws DAVException, java.rmi.RemoteException
doControl
in interface DAVResourceInterface
DAVException
- in the case of a WebDAV error
java.rmi.RemoteException
- in the case of network failurespublic java.util.List getPreviousVersionNames() throws DAVException, java.rmi.RemoteException
getPreviousVersionNames
in interface DAVResourceInterface
DAVException
- in the case of a WebDAV error
java.rmi.RemoteException
- in the case of network failurespublic void doCheckout() throws DAVException, java.rmi.RemoteException
doCheckout
in interface DAVResourceInterface
DAVException
- in the case of a WebDAV error
java.rmi.RemoteException
- in the case of network failurespublic void doLabel(int labelAction, java.lang.String label) throws DAVException, java.rmi.RemoteException
doLabel
in interface DAVResourceInterface
labelAction
- Specify whether the label should be set (specify 1), added (specify 2), removed (specify 3)label
- The value of the label
DAVException
- in the case of a WebDAV error
java.rmi.RemoteException
- in the case of network failurespublic void doCheckin() throws DAVException, java.rmi.RemoteException
doCheckin
in interface DAVResourceInterface
DAVException
- in the case of a WebDAV error
java.rmi.RemoteException
- in the case of network failurespublic void doUncheckout() throws DAVException, java.rmi.RemoteException
doUncheckout
in interface DAVResourceInterface
DAVException
- in the case of a WebDAV error
java.rmi.RemoteException
- in the case of network failurespublic com.sas.services.webdav.Version getCheckedIn() throws DAVException, java.rmi.RemoteException
getCheckedIn
in interface DAVResourceInterface
DAVException
- in the case of a WebDAV error
java.rmi.RemoteException
- in the case of network failurespublic com.sas.services.webdav.Version getCheckedOut() throws DAVException, java.rmi.RemoteException
getCheckedOut
in interface DAVResourceInterface
DAVException
- in the case of a WebDAV error
java.rmi.RemoteException
- in the case of network failurespublic com.sas.services.webdav.Version getVersion(java.lang.String versionName) throws DAVException, java.rmi.RemoteException
getVersion
in interface DAVResourceInterface
versionName
- Which version to retrieve for this resource
DAVException
- in the case of a WebDAV error
java.rmi.RemoteException
- in the case of network failurespublic void setExistsRequirement(int requirement)
setExistsRequirement
in interface DAVResourceInterface
public int getExistsRequirement()
getExistsRequirement
in interface DAVResourceInterface
protected org.apache.webdav.lib.WebdavState discoverLock(java.lang.String owner, java.lang.String path, org.apache.webdav.lib.WebdavState state)
owner
- the activelock ownerpath
- the pathstate
- the state to save the locktoken
public com.sas.services.webdav.TreeNode getSupportedPrivilegeSet()
DAVResourceInterface
getSupportedPrivilegeSet
in interface DAVResourceInterface
public java.util.Set getCurrentUserPrivilegeSet()
DAVResourceInterface
getCurrentUserPrivilegeSet
in interface DAVResourceInterface
public java.util.List getChildrenList(java.lang.String path)
getChildrenList
in interface DAVResourceInterface
path
- The path of the resource
public java.util.Map 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 errorpublic 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 |