|
| Services |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||
Provides the interface for a DAV Resource. A DAVResource is a WebDAV (Distributed Authoring and Versioning) resource as specified in IETF RFC 2518.
| Method Summary | |
void |
close()
Close the socket used for this connection. |
DAVResource |
copy(String targetUrl)
Copy resource to the target destination |
void |
delete()
Delete the resource |
void |
doCheckin()
Check in this resource. |
void |
doCheckout()
Checks out this resource. |
void |
doControl()
Puts the resource until version control. |
void |
doLabel(int labelAction,
String label)
Modify the version label on the resource (if this is supported by the server). |
void |
doUncheckout()
Uncheckout this resource, cancelling a previous checkout. |
boolean |
exists()
Returns whether the resource exists or not |
String |
getACL()
Get the Access Control List for this resource. |
org.apache.webdav.lib.Lock |
getActiveLockFor(String owner)
Get an active lock, if it exists, for the owner |
Version |
getCheckedIn()
Retrieves the currently checked in resource. |
Version |
getCheckedOut()
Retrieves the currently checked out resource. |
byte[] |
getContents()
Return the contents of the resource as a byte array |
void |
getContents(File fileData)
Get the content of the resource into a file specified as the parameter |
String |
getContentsAsString()
Return the contents of the resource as a String |
InputStream |
getContentsInputStream()
Return the content of the resource as a stream |
String |
getContentType()
Return the content type of the content for this resource |
int |
getDepth()
Get the current depth value |
int |
getExistsRequirement()
|
boolean |
getOverwrite()
Get the overwrite flag - can this resource be overwritten |
String |
getPath()
Get the path for the WebDAV resource that is currently represented by this DAVResource |
List |
getPreviousVersionNames()
Gets a list of previous version names for this resource. |
org.apache.webdav.lib.Property[] |
getProperties()
Get the properties for the resource. |
org.apache.webdav.lib.Property[] |
getProperties(Element[] propNames)
Get the property values for the properties specified in the parameter |
org.apache.webdav.lib.Property[] |
getProperties(PropertyName[] propNames)
Get the property values for the properties specified in the parameter |
org.apache.webdav.lib.Property[] |
getProperties(String propNames)
Returns a properties for a given set of property names. |
org.apache.webdav.lib.Property[] |
getProperty(Element propName)
Get the property values for the properties specified in the parameter |
org.apache.webdav.lib.Property[] |
getProperty(PropertyName propName)
Get the property value for the property specified in the parameter |
org.apache.webdav.lib.Property[] |
getProperty(String propName)
Get the property value for the property specified in the parameter |
org.apache.webdav.lib.Property[] |
getPropertyNames()
Get all the property names on the resource |
int |
getStatusCode()
Get the status code for the last operation/method |
String |
getStatusMessage()
Get the message associated with the status code for the last operation/method |
String |
getTempDir()
Returns the current setting for the directory for temporary files |
URL |
getURL()
Get the URL that the resource represents |
Version |
getVersion(String versionName)
Gets a particular version of this resource |
boolean |
isCollection()
Is this resource a collection? |
boolean |
isLocked()
Is this resource locked? |
String |
lock()
Lock this resource |
boolean |
makeCollection()
Make a collection. |
DAVResource |
move(String targetUrl)
Move this resource to the location given in the parameter |
void |
removeProperties(Element[] propNames)
Remove the properties specified in the parameter |
void |
removeProperties(PropertyName[] propNames)
Remove the properties specified in the parameter |
void |
removeProperty(Element propName)
Remove the property specified in the parameter |
void |
removeProperty(PropertyName propName)
Remove the property specified in the parameter |
void |
removeProperty(String propName)
Remove the property specified in the parameter |
org.apache.webdav.lib.Property[] |
report(String reportBody)
Run a report on the current resource. |
org.apache.webdav.lib.Property[] |
search(Element searchQuery)
Using the XML representation of the search query, perform the search on the server |
org.apache.webdav.lib.Property[] |
search(String searchString)
Using the search query provided as a string, perform the search on this server |
String |
setACL(String acl)
Set/Update the Access Control List for this resource. |
void |
setContents(byte[] contents)
Set the contents of the resource, passing in a byte array |
void |
setContents(InputStream is)
Set the contents of the resource from an input stream. |
void |
setContents(String content)
Set the contents of the resource, passing in a URL |
void |
setContents(URL url)
Set the contents of the resource, passing in a URL |
void |
setContentType(String contentType)
Set the contents type for the content of the resource |
void |
setDepth(int depth)
Set the depth that will be used for the following operations DEPTH_0, DEPTH_1 and DEPTH_INFINITY from DepthSupport are valid values |
void |
setExistsRequirement(int requirement)
|
void |
setOverwrite(boolean overwrite)
Set the overwrite flag - can this resource be overwritten |
void |
setPath(String path)
Set the path for this resource. |
void |
setPathNoAction(String path)
Set the path for this resource. |
void |
setProperties(DocumentFragment props)
Set the values of properties, as given in the parameter |
void |
setProperties(Element[] props)
Set the values of properties, as given in the parameter |
void |
setProperties(PropertyName[] propNames,
String[] props)
Set the values of properties, as given in the parameter |
void |
setProperty(Element prop)
Set the value of a property, as given in the parameter |
void |
setProperty(PropertyName propName,
String prop)
Set the value of a property, as given in the parameter |
void |
setSessionContext(SessionContextInterface sessionContext)
Set the session context for this DAVResource. |
void |
setTempDir(String tempDir)
Provides a way to set a directory for temporary files. |
boolean |
SUCCEEDED()
Returns whether the last method was successful or not. |
void |
unlock()
Unlock the resource, if previously locked by the same principal |
void |
unlock(String lockToken)
Unlock the resource, with the correct locktoken |
| Method Detail |
public void delete()
throws DAVException,
RemoteException
DAVException - in the event of a WebDAV failure.RemoteException - in the event of network failure.
public org.apache.webdav.lib.Lock getActiveLockFor(String owner)
throws DAVException,
RemoteException
owner - The owner for which the lock is being soughtDAVException - in the event of a WebDAV failure.RemoteException - in the event of network failure.
public void getContents(File fileData)
throws DAVException,
RemoteException
fileData - The file into which the contents of the resource should be writtenDAVException - in the event of a WebDAV failure.RemoteException - in the event of network failure.
public byte[] getContents()
throws DAVException,
RemoteException
DAVException - in the event of a WebDAV failure.RemoteException - in the event of network failure.
public String getContentsAsString()
throws DAVException,
RemoteException
DAVException - in the event of a WebDAV failure.RemoteException - in the event of network failure.
public String getContentType()
throws DAVException,
RemoteException
DAVException - in the event of a WebDAV failure.RemoteException - in the event of network failure.
public InputStream getContentsInputStream()
throws DAVException,
RemoteException
DAVException - in the event of a WebDAV failure.RemoteException - in the event of network failure.
public org.apache.webdav.lib.Property[] getProperties()
throws DAVException,
RemoteException
DAVException - in the event of a WebDAV failure.RemoteException - in the event of network failure.
public org.apache.webdav.lib.Property[] getProperties(Element[] propNames)
throws DAVException,
RemoteException
DAVException - in the event of a WebDAV failure.RemoteException - in the event of network failure.
public org.apache.webdav.lib.Property[] getProperty(Element propName)
throws DAVException,
RemoteException
DAVException - in the event of a WebDAV failure.RemoteException - in the event of network failure.
public org.apache.webdav.lib.Property[] getProperties(PropertyName[] propNames)
throws DAVException,
RemoteException
DAVException - in the event of a WebDAV failure.RemoteException - in the event of network failure.
public org.apache.webdav.lib.Property[] getProperty(String propName)
throws DAVException,
RemoteException
DAVException - in the event of a WebDAV failure.RemoteException - in the event of network failure.
public org.apache.webdav.lib.Property[] getProperty(PropertyName propName)
throws DAVException,
RemoteException
DAVException - in the event of a WebDAV failure.RemoteException - in the event of network failure.
public org.apache.webdav.lib.Property[] getPropertyNames()
throws DAVException,
RemoteException
DAVException - in the event of a WebDAV failure.RemoteException - in the event of network failure.
public int getStatusCode()
throws DAVException,
RemoteException
DAVException - in the event of a WebDAV failure.RemoteException - in the event of network failure.
public String getStatusMessage()
throws DAVException,
RemoteException
DAVException - in the event of a WebDAV failure.RemoteException - in the event of network failure.
public URL getURL()
throws DAVException,
RemoteException
DAVException - in the event of a WebDAV failure.RemoteException - in the event of network failure.
public boolean isCollection()
throws DAVException,
RemoteException
DAVException - in the event of a WebDAV failure.RemoteException - in the event of network failure.
public boolean isLocked()
throws DAVException,
RemoteException
DAVException - in the event of a WebDAV failure.RemoteException - in the event of network failure.
public String lock()
throws DAVException,
RemoteException
DAVException - in the event of a WebDAV failure.RemoteException - in the event of network failure.
public DAVResource move(String targetUrl)
throws DAVException,
RemoteException
targetUrl - The destination URL for this copyDAVException - in the event of a WebDAV failure.RemoteException - in the event of network failure.
public void removeProperties(PropertyName[] propNames)
throws DAVException,
RemoteException
propNames - An array of property names that should be removedDAVException - in the event of a WebDAV failure.RemoteException - in the event of network failure.
public void removeProperties(Element[] propNames)
throws DAVException,
RemoteException
propNames - An array of property names that should be removedDAVException - in the event of a WebDAV failure.RemoteException - in the event of network failure.
public void removeProperty(Element propName)
throws DAVException,
RemoteException
propName - The name of a property that should be removed from this resourceDAVException - in the event of a WebDAV failure.RemoteException - in the event of network failure.
public void removeProperty(String propName)
throws DAVException,
RemoteException
propName - The name of a property that should be removed from this resourceDAVException - in the event of a WebDAV failure.RemoteException - in the event of network failure.
public void removeProperty(PropertyName propName)
throws DAVException,
RemoteException
propName - The name of a property that should be removed from this resourceDAVException - in the event of a WebDAV failure.RemoteException - in the event of network failure.
public void setContents(byte[] contents)
throws DAVException,
RemoteException
contents - The byte array containing the content for this resourceDAVException - in the event of a WebDAV failure.RemoteException - in the event of network failure.
public void setContents(URL url)
throws DAVException,
RemoteException
url - A url that represents the content for this resourceDAVException - in the event of a WebDAV failure.RemoteException - in the event of network failure.
public void setContents(String content)
throws DAVException,
RemoteException
content - The string containing the content for this resourceDAVException - in the event of a WebDAV failure.RemoteException - in the event of network failure.
public void setContents(InputStream is)
throws DAVException,
RemoteException
InputStreamAdapteris - An input stream representing the content for this resourceDAVException - in the event of a WebDAV failure.RemoteException - in the event of network failure.
public void setContentType(String contentType)
throws DAVException,
RemoteException
contentType - The content type for this resourceDAVException - in the event of a WebDAV failure.RemoteException - in the event of network failure.
public void setProperties(Element[] props)
throws DAVException,
RemoteException
props - An array of properties to be set on this resourceDAVException - in the event of a WebDAV failure.RemoteException - in the event of network failure.
public void setProperties(PropertyName[] propNames,
String[] props)
throws DAVException,
RemoteException
propNames - An array of property names to be set on this resourceprops - An array of property values to be set on this resourceDAVException - in the event of a WebDAV failure.RemoteException - in the event of network failure.
public void setProperties(DocumentFragment props)
throws DAVException,
RemoteException
props - An XML document fragment that defines the properties to be set on this resourceDAVException - in the event of a WebDAV failure.RemoteException - in the event of network failure.
public void setProperty(PropertyName propName,
String prop)
throws DAVException,
RemoteException
propName - An property name to be set on this resourceprop - A property value to be set on this resourceDAVException - in the event of a WebDAV failure.RemoteException - in the event of network failure.
public void setProperty(Element prop)
throws DAVException,
RemoteException
prop - An XML element that represents a property to be set on this resourceDAVException - in the event of a WebDAV failure.RemoteException - in the event of network failure.
public void unlock()
throws DAVException,
RemoteException
DAVException - in the event of a WebDAV failure.RemoteException - in the event of network failure.
public void unlock(String lockToken)
throws DAVException,
RemoteException
lockToken - The lock token for this resourceDAVException - in the event of a WebDAV failure.RemoteException - in the event of network failure.
public boolean getOverwrite()
throws DAVException,
RemoteException
DAVException - in the event of a WebDAV failure.RemoteException - in the event of network failure.
public void setOverwrite(boolean overwrite)
throws DAVException,
RemoteException
overwrite - The value of the overwrite flag to set on the resourceDAVException - in the event of a WebDAV failure.RemoteException - in the event of network failure.
public void setDepth(int depth)
throws DAVException,
RemoteException
depth - The depth for operations on this resourceDAVException - in the event of a WebDAV failure.RemoteException - in the event of network failure.
public int getDepth()
throws DAVException,
RemoteException
DAVException - in the event of a WebDAV failure.RemoteException - in the event of network failure.
public org.apache.webdav.lib.Property[] search(String searchString)
throws DAVException,
RemoteException
searchString - A string containing an XML DASL search requestDAVException - in the event of a WebDAV failure.RemoteException - in the event of network failure.
public org.apache.webdav.lib.Property[] search(Element searchQuery)
throws DAVException,
RemoteException
searchQuery - An XML document containing a DASL search requestDAVException - in the event of a WebDAV failure.RemoteException - in the event of network failure.
public void close()
throws RemoteException
RemoteException - in the event of network failure.
public void setTempDir(String tempDir)
throws 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.tempDir - Temp directory for temporary filesRemoteException - in the event of network failure.
public String getTempDir()
throws RemoteException
RemoteException - in the event of network failure.
public boolean exists()
throws RemoteException
RemoteException - in the event of network failure.
public org.apache.webdav.lib.Property[] report(String reportBody)
throws DAVException,
RemoteException
reportBody - An XML document string that represents the report
requestDAVException - in the event of a WebDAV failure.RemoteException - in the event of network failure.
public String getACL()
throws DAVException,
RemoteException
DAVException - in the event of a WebDAV failure.RemoteException - in the event of network failure.
public String setACL(String acl)
throws DAVException,
RemoteException
acl - An XML serialized document describing the ACL for this resourceDAVException - in the event of a WebDAV failure.RemoteException - in the event of network failure.
public void setSessionContext(SessionContextInterface sessionContext)
throws RemoteException
sessionContext - The session context for this DAVResourceRemoteException - in the event of network failure.
public String getPath()
throws RemoteException
RemoteException - in the event of a network failure
public void setPath(String path)
throws RemoteException
path - The new path for the WebDAV resourceRemoteException - in the event of a network failure
public void setPathNoAction(String path)
throws RemoteException
path - The new path for the WebDAV resourceRemoteException - in the event of a network failure
public boolean makeCollection()
throws DAVException,
RemoteException
DAVException - in the case of a WebDAV error
public boolean SUCCEEDED()
throws RemoteException
public org.apache.webdav.lib.Property[] getProperties(String propNames)
throws DAVException,
RemoteException
propNames - names of properties for which values should be returned
public DAVResource copy(String targetUrl)
throws DAVException,
RemoteException
targetUrl - location to which current resource is to be copied.
public void doControl()
throws DAVException,
RemoteException
DAVException - in the case of a WebDAV errorRemoteException - in the case of network failures
public void doLabel(int labelAction,
String label)
throws DAVException,
RemoteException
labelAction - Specify whether the label should be set (specify 1), added (specify 2), removed (specify 3)label - The value of the labelDAVException - in the case of a WebDAV errorRemoteException - in the case of network failures
public List getPreviousVersionNames()
throws DAVException,
RemoteException
DAVException - in the case of a WebDAV errorRemoteException - in the case of network failures
public void doCheckout()
throws DAVException,
RemoteException
DAVException - in the case of a WebDAV errorRemoteException - in the case of network failures
public void doCheckin()
throws DAVException,
RemoteException
DAVException - in the case of a WebDAV errorRemoteException - in the case of network failures
public void doUncheckout()
throws DAVException,
RemoteException
DAVException - in the case of a WebDAV errorRemoteException - in the case of network failures
public Version getVersion(String versionName)
throws DAVException,
RemoteException
versionName - Which version to retrieve for this resourceDAVException - in the case of a WebDAV errorRemoteException - in the case of network failures
public Version getCheckedIn()
throws DAVException,
RemoteException
DAVException - in the case of a WebDAV errorRemoteException - in the case of network failures
public Version getCheckedOut()
throws DAVException,
RemoteException
DAVException - in the case of a WebDAV errorRemoteException - in the case of network failures
public void setExistsRequirement(int requirement)
throws RemoteException
public int getExistsRequirement()
throws RemoteException
|
| Services |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||