*** This interface provides Binary Compatibility only, not Source Compatibility ***
Package com.sas.services.webdav
Interface DAVResourceInterface
- All Superinterfaces:
Remote
- All Known Implementing Classes:
DAVResource
@SASScope("ALL")
@BinaryCompatibilityOnly
public interface DAVResourceInterface
extends Remote
Provides the interface for a DAV Resource. A DAVResource is a WebDAV
(Distributed Authoring and Versioning) resource as specified in IETF RFC
2518.
- Since:
- 9.0
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes the socket used for this connection.org.apache.http.entity.ContentTypeGets the Apache HTTP entity content type of the content for this DAV resource.copy(String targetUrl) Copies resource to the target destination.voiddelete()Deletes this DAV resource.voidCheck in this DAV resource.voidChecks out this DAV resource.voidPuts the resource under version control.voiddoLabel(int labelAction, String label) Modifies the version label on the resource (if this is supported by the server).voiddoLabel(int labelAction, String label, int depth) Modifies the label on the version resource (if this is supported by the server).doReport(org.apache.jackrabbit.webdav.version.report.ReportInfo reportInfo) Gets a report on the current DAV resource.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.voidUncheckout this DAV resource, canceling a previous checkout.booleanexists()Returns whether the resource exists.AclgetAcl()Gets the access control list for this DAV resource.StringgetACL()Gets the access control list (ACL) for this DAV resource.VersionRetrieves the currently checked in resource.VersionRetrieves the currently checked out resource.ListgetChildrenList(String path) Gets the list of children.byte[]Gets the contents of this DAV resource as a byte array.voidgetContents(File fileData) Gets the content of this DAV resource into a file specified as the parameter.StringGets the contents of this DAV resource as a String.InputStreamGets the content of this DAV resource as a stream.StringGets the content type of the content for this DAV resource.Gets all of the DAV resource's properties using the resource's depth.getDavProperties(int depth) Gets all of the DAV resource's properties for the specified depth.getDavProperties(PropertyName[] propertyNames) Gets all the properties for the specified property names on the DAV resource.getDavProperties(PropertyName[] propertyNames, int depth) Gets all the properties for the specified property names on the DAV resource.getDavProperties(org.apache.jackrabbit.webdav.property.DavPropertyNameSet davPropertyNameSet, int depth) Gets the properties for the specified DAV property names and search depth.Gets DAV properties for all of a DAV resource's property names.getDavPropertyNames(int depth) Gets DAV properties for all of a DAV resource's property names for the specified depth.intgetDepth()Gets the value for depth.intGets the existence requirement.booleanGets the overwrite flag which specifies whether this DAV resource can be overwritten.StringgetPath()Gets the path for the WebDAV resource that is currently represented by this DAVResource.ListGets a list of previous version names for this DAV resource.intGets the HTTP status code for the last operation/method.StringGets the message associated with the status code for the last operation/method.StringReturns the current setting for the directory for temporary files.URLgetURL()Gets the URL that this DAV resource represents.VersiongetVersion(String versionName) Gets a particular version of this DAV resource.booleanIs this DAV resource a collection?booleanisLocked()Is this DAV resource locked?Stringlock()Locks this DAV resource.booleanMakes a collection.move(String targetUrl) Moves this DAV resource to the location given in the parameter.voidremoveProperties(PropertyName[] propNames) Removes the properties specified in the parameter.voidremoveProperties(Element[] propNames) Removes the properties specified in the parameter.voidremoveProperty(PropertyName propName) Removes the property specified in the parameter.voidremoveProperty(String propName) Removes the property specified in the parameter.voidremoveProperty(Element propName) Removes the property specified in the parameter.StringsetAcl(Acl acl) Sets the access control list for this DAV resource.StringsetACL(String acl) Set/Update the Access Control List for this DAV resource.voidsetContents(byte[] contents) Sets the contents of the resource, passing in a byte array.voidsetContents(InputStream is) Sets the contents of the resource from an input stream.voidsetContents(String content) Sets the contents of the resource, passing in a URL.voidsetContents(URL url) Sets the contents of the resource, passing in a URL.voidsetContentType(String contentType) Sets the contents type for the content of the resource.voidsetCredentialsProvider(org.apache.http.client.CredentialsProvider credentialsProvider) Sets a credentials provider.voidsetDepth(int depth) Set the value for depth.voidsetExistsRequirement(int requirement) Sets the existence requirement.voidsetOverwrite(boolean overwrite) Sets the overwrite flag which specifies whether this DAV resource can be overwritten.voidsetPath(String path) Sets the path for this DAV resource.voidsetProperties(PropertyName[] propNames, String[] propValues) Sets the values of properties, as given in the parameter.voidsetProperties(DocumentFragment props) Sets the values of properties, as given in the parameter.voidsetProperties(Element[] props) Sets the values of properties, as given in the parameter.voidsetProperty(PropertyName propName, String propValue) Sets the value of a property, as given in the parameter.voidsetProperty(Element prop) Sets the value of a property, as given in the parameter.voidsetTempDir(String tempDir) Provides a way to set a directory for temporary files.booleanReturns whether the last method was successful or not.voidunlock()Unlocks the resource, if previously locked by the same principal.voidunlock(String lockToken) Unlocks the resource, with the correctlocktoken.
-
Method Details
-
delete
Deletes this DAV resource.- Throws:
DAVException- in the event of a WebDAV failure.RemoteException- in the event of network failure.
-
getContents
Gets the content of this DAV resource into a file specified as the parameter.- Parameters:
fileData- The file into which the contents of the resource should be written.- Throws:
DAVException- in the event of a WebDAV failure.RemoteException- in the event of network failure.
-
getContents
Gets the contents of this DAV resource as a byte array.- Returns:
- byte[] The contents of the resource as a byte array
- Throws:
DAVException- in the event of a WebDAV failure.RemoteException- in the event of network failure.
-
getContentsAsString
Gets the contents of this DAV resource as a String.- Returns:
- String representation of the contents of this DAV resource.
- Throws:
DAVException- in the event of a WebDAV failure.RemoteException- in the event of network failure.
-
getContentType
Gets the content type of the content for this DAV resource.- Returns:
- String The content type for this DAV resource
- Throws:
DAVException- in the event of a WebDAV failure.RemoteException- in the event of network failure.- See Also:
-
contentType
Gets the Apache HTTP entity content type of the content for this DAV resource.- Returns:
- Apache HTTP entity content type of the content for this DAV resource or
nullif no MIME type has been specified. - Throws:
DAVException- in the event of a WebDAV failure.RemoteException- in the event of network failure.- Since:
- 9.4m8
- See Also:
-
getContentsInputStream
Gets the content of this DAV resource as a stream.- Returns:
- InputStream The stream representing the content of the resource.
- Throws:
DAVException- in the event of a WebDAV failure.RemoteException- in the event of network failure.
-
getStatusCode
Gets the HTTP status code for the last operation/method.- Returns:
- The HTTP status code for the last request on this DAV resource.
- Throws:
DAVException- in the event of a WebDAV failure.RemoteException- in the event of network failure.
-
getStatusMessage
Gets the message associated with the status code for the last operation/method.- Returns:
- The status message for the last request on this DAV resource.
- Throws:
DAVException- in the event of a WebDAV failure.RemoteException- in the event of network failure.
-
getURL
Gets the URL that this DAV resource represents.- Returns:
- The URL for this DAV resource.
- Throws:
DAVException- in the event of a WebDAV failure.RemoteException- in the event of network failure.
-
isCollection
Is this DAV resource a collection?- Returns:
trueif it is a collection,falseotherwise.- Throws:
DAVException- in the event of a WebDAV failure.RemoteException- in the event of network failure.
-
isLocked
Is this DAV resource locked?- Returns:
trueif it is locked,falseotherwise.- Throws:
DAVException- in the event of a WebDAV failure.RemoteException- in the event of network failure.
-
lock
Locks this DAV resource.- Returns:
- The lock token if the resource is successfully locked.
- Throws:
DAVException- in the event of a WebDAV failure.RemoteException- in the event of network failure.
-
move
Moves this DAV resource to the location given in the parameter.- Parameters:
targetUrl- The destination URL for this copy.- Returns:
- A DAVResource that represents the new resource.
- Throws:
DAVException- in the event of a WebDAV failure.RemoteException- in the event of network failure.
-
removeProperties
Removes the properties specified in the parameter.- Parameters:
propNames- An array of property names that should be removed.- Throws:
DAVException- in the event of a WebDAV failure.RemoteException- in the event of network failure.
-
removeProperties
Removes the properties specified in the parameter.- Parameters:
propNames- An array of property names that should be removed.- Throws:
DAVException- in the event of a WebDAV failure.RemoteException- in the event of network failure.
-
removeProperty
Removes the property specified in the parameter.- Parameters:
propName- The name of a property that should be removed from this DAV resource.- Throws:
DAVException- in the event of a WebDAV failure.RemoteException- in the event of network failure.
-
removeProperty
Removes the property specified in the parameter.- Parameters:
propName- The name of a property that should be removed from this DAV resource.- Throws:
DAVException- in the event of a WebDAV failure.RemoteException- in the event of network failure.
-
removeProperty
Removes the property specified in the parameter.- Parameters:
propName- The name of a property that should be removed from this DAV resource.- Throws:
DAVException- in the event of a WebDAV failure.RemoteException- in the event of network failure.
-
setContents
Sets the contents of the resource, passing in a byte array.- Parameters:
contents- The byte array containing the content for this DAV resource.- Throws:
DAVException- in the event of a WebDAV failure.RemoteException- in the event of network failure.
-
setContents
Sets the contents of the resource, passing in a URL.- Parameters:
url- A URL that represents the content for this DAV resource.- Throws:
DAVException- in the event of a WebDAV failure.RemoteException- in the event of network failure.
-
setContents
Sets the contents of the resource, passing in a URL.- Parameters:
content- The string containing the content for this DAV resource.- Throws:
DAVException- in the event of a WebDAV failure.RemoteException- in the event of network failure.
-
setContents
Sets the contents of the resource from an input stream. For remote deployment the InputStream should be wrapped in anInputStreamAdapter.- Parameters:
is- An input stream representing the content for this DAV resource.- Throws:
DAVException- in the event of a WebDAV failure.RemoteException- in the event of network failure.
-
setContentType
Sets the contents type for the content of the resource.- Parameters:
contentType- The content type for this DAV resource.- Throws:
DAVException- in the event of a WebDAV failure.RemoteException- in the event of network failure.- See Also:
-
setProperties
Sets the values of properties, as given in the parameter.- Parameters:
props- An array of properties to be set on this DAV resource.- Throws:
DAVException- in the event of a WebDAV failure.RemoteException- in the event of network failure.
-
setProperties
void setProperties(PropertyName[] propNames, String[] propValues) throws DAVException, RemoteException Sets the values of properties, as given in the parameter.- Parameters:
propNames- 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.- Throws:
DAVException- in the event of a WebDAV failure.RemoteException- in the event of network failure.
-
setProperties
Sets the values of properties, as given in the parameter.- Parameters:
props- An XML document fragment that defines the properties to be set on this DAV resource.- Throws:
DAVException- in the event of a WebDAV failure.RemoteException- in the event of network failure.
-
setProperty
Sets the value of a property, as given in the parameter.- Parameters:
propName- An property name to be set on this DAV resource.propValue- A property value to be set on this DAV resource.- Throws:
DAVException- in the event of a WebDAV failure.RemoteException- in the event of network failure.
-
setProperty
Sets the value of a property, as given in the parameter.- Parameters:
prop- An XML element that represents a property to be set on this DAV resource.- Throws:
DAVException- in the event of a WebDAV failure.RemoteException- in the event of network failure.
-
unlock
Unlocks the resource, if previously locked by the same principal.- Throws:
DAVException- in the event of a WebDAV failure.RemoteException- in the event of network failure.
-
unlock
Unlocks the resource, with the correctlocktoken.- Parameters:
lockToken- The lock token for this DAV resource.- Throws:
DAVException- in the event of a WebDAV failure.RemoteException- in the event of network failure.
-
getOverwrite
Gets the overwrite flag which specifies whether this DAV resource can be overwritten.- Returns:
trueif the overwrite flag is set,falseotherwise- Throws:
DAVException- in the event of a WebDAV failure.RemoteException- in the event of network failure.
-
setOverwrite
Sets the overwrite flag which specifies whether this DAV resource can be overwritten.- Parameters:
overwrite- The value of the overwrite flag to set on the resource.- Throws:
DAVException- in the event of a WebDAV failure.RemoteException- in the event of network failure.
-
setDepth
Set the value for depth. This is the depth on which DAV operations will be based. They can be one of three values:DavConstants.DEPTH_0DavConstants.DEPTH_1DavConstants.DEPTH_INFINITY
- Parameters:
depth- The depth on which DAV operations will be based. Specify one ofDavConstants.DEPTH_0orDavConstants.DEPTH_1orDavConstants.DEPTH_INFINITY.- Throws:
DAVException- in the event of a WebDAV failure.RemoteException- in the event of network failure.
-
getDepth
Gets the value for depth. This is the depth on which DAV operations will be based. They can be one of three values:DavConstants.DEPTH_0DavConstants.DEPTH_1DavConstants.DEPTH_INFINITY
- Returns:
- The depth on which DAV operations will be based.
- Throws:
DAVException- in the event of a WebDAV failure.RemoteException- in the event of network failure.
-
close
void close() throws RemoteExceptionCloses the socket used for this connection. This can be useful for servers that have a limit on the number of connections (e.g. IIS), and provides a way to control network resources.- Throws:
RemoteException- in the event of network failure.
-
setTempDir
void setTempDir(String tempDir) throws RemoteException Provides a way to set a directory for temporary files. Thejava.io.tmpsystem 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.- Parameters:
tempDir- Temporary directory for temporary files.- Throws:
RemoteException- in the event of network failure.
-
getTempDir
String getTempDir() throws RemoteExceptionReturns the current setting for the directory for temporary files.- Returns:
- The temporary directory for temporary files.
- Throws:
RemoteException- in the event of network failure.
-
exists
boolean exists() throws RemoteExceptionReturns whether the resource exists.- Returns:
trueif resource exists,falseotherwise.- Throws:
RemoteException- in the event of network failure.
-
getACL
Gets the access control list (ACL) for this DAV resource.- Returns:
- String An XML serialized document describing the ACL for this DAV resource.
- Throws:
DAVException- in the event of a WebDAV failure.RemoteException- in the event of network failure.- See Also:
-
setACL
Set/Update the Access Control List for this DAV resource.- Parameters:
acl- An XML serialized document describing the ACL for this DAV resource.- Returns:
- Document The result document from the ACL method or
nullif there was no response document. - Throws:
DAVException- in the event of a WebDAV failure.RemoteException- in the event of network failure.- See Also:
-
getPath
String getPath() throws RemoteExceptionGets the path for the WebDAV resource that is currently represented by this DAVResource.- Returns:
- The current path for this DAV resource.
- Throws:
RemoteException- in the event of a network failure.
-
setPath
void setPath(String path) throws RemoteException Sets the path for this DAV resource. If the resource was originally created as http://server/origpath, then calling this method will change the resource path to http://server/path. This allows the same DAVResource object to be used for any WebDAV resource.- Parameters:
path- The new path for the WebDAV resource.- Throws:
RemoteException- in the event of a network failure.
-
makeCollection
Makes a collection. This method only works on a null resource (one that doesn't exist yet). One would normally call this method immediately after creating this DAVResource.- Returns:
- boolean True is make collection successful, false otherwise.
- Throws:
DAVException- in the case of a WebDAV error.RemoteException- in the case of network failures.
-
SUCCEEDED
boolean SUCCEEDED() throws RemoteExceptionReturns whether the last method was successful or not. The HTTP status codes in the range 200-299 are successful. All others indicate some sort of unsuccessful attempt.- Returns:
trueif last method was successful,falseotherwise.- Throws:
RemoteException- in the case of network failures.
-
copy
Copies resource to the target destination.- Parameters:
targetUrl- location to which current resource is to be copied.- Returns:
- If successful, then a new DAVResource representing the new destination is created and returned.
- Throws:
DAVException- in the case of a WebDAV error.RemoteException- in the case of network failures.
-
doControl
Puts the resource under version control.- Throws:
DAVException- in the case of a WebDAV error.RemoteException- in the case of network failures.
-
doLabel
Modifies the version label on the resource (if this is supported by the server).- Parameters:
labelAction- Specifies the action which is to be executed.- LabelInfo#TYPE_SET
- LabelInfo#TYPE_REMOVE
- LabelInfo#TYPE_ADD
label- The value of the label.- Throws:
DAVException- in the case of a WebDAV error.RemoteException- in the case of network failures.- See Also:
-
doLabel
Modifies the label on the version resource (if this is supported by the server).- Parameters:
labelAction- Specifies the action which is to be executed.- LabelInfo#TYPE_SET
- LabelInfo#TYPE_REMOVE
- LabelInfo#TYPE_ADD
label- The value of the label.depth- The depth.- Throws:
DAVException- in the case of a WebDAV error.RemoteException- in the case of network failures.- See Also:
-
getPreviousVersionNames
Gets a list of previous version names for this DAV resource.- Returns:
- List(String) The version names for this DAV resource.
- Throws:
DAVException- in the case of a WebDAV error.RemoteException- in the case of network failures.
-
doCheckout
Checks out this DAV resource.- Throws:
DAVException- in the case of a WebDAV error.RemoteException- in the case of network failures.
-
doCheckin
Check in this DAV resource.- Throws:
DAVException- in the case of a WebDAV error.RemoteException- in the case of network failures.
-
doUncheckout
Uncheckout this DAV resource, canceling a previous checkout.- Throws:
DAVException- in the case of a WebDAV error.RemoteException- in the case of network failures.
-
getVersion
Gets a particular version of this DAV resource.- Parameters:
versionName- Which version to retrieve for this DAV resource.- Returns:
- Version An object describing the version of this DAV resource.
- Throws:
DAVException- in the case of a WebDAV error.RemoteException- in the case of network failures.
-
getCheckedIn
Retrieves the currently checked in resource.- Returns:
- Version An object describing the version that is checked in.
- Throws:
DAVException- in the case of a WebDAV error.RemoteException- in the case of network failures.
-
getCheckedOut
Retrieves the currently checked out resource.- Returns:
- Version An object describing the version that is checked out.
- Throws:
DAVException- in the case of a WebDAV error.RemoteException- in the case of network failures.
-
setExistsRequirement
void setExistsRequirement(int requirement) throws RemoteException Sets the existence requirement.- Parameters:
requirement-0if we don't care or1if it must exist or2if it must not exist.- Throws:
RemoteException- in the case of network failures.
-
getExistsRequirement
int getExistsRequirement() throws RemoteExceptionGets the existence requirement.- Returns:
0if we don't care or1if it must exist or2if it must not exist.- Throws:
RemoteException- in the case of network failures.
-
getAcl
Gets the access control list for this DAV resource.- Returns:
- The access control list for this DAV resource.
- Throws:
DAVException- in the case of a WebDAV error.RemoteException- in the case of network failures.- See Also:
-
setAcl
Sets the access control list for this DAV resource.- Parameters:
acl- The access control list to set for this DAV resource.- Returns:
- The string representation of the access control list or
nullif there was no response document. - Throws:
DAVException- in the case of a WebDAV error.RemoteException- in the case of network failures.- See Also:
-
getChildrenList
Gets the list of children. If this is not a collection, or is an empty collection the returned list will be empty. Otherwise, it will contain the path for each child in the collection.- Parameters:
path- The path of this DAV resource.- Returns:
- List (of String) The paths for the children.
- Throws:
DAVException- in the case of a WebDAV error.RemoteException- in the case of network failures.
-
setCredentialsProvider
void setCredentialsProvider(org.apache.http.client.CredentialsProvider credentialsProvider) Sets a credentials provider. When authentication has failed, the credentials provider is called to provide a set of credentials for authentication. This allows an external agent to provide credentials when original credentials no longer work e.g. one-time passwords. -
getDavProperties
Gets all of the DAV resource's properties using the resource's depth.- Returns:
DavPropertyResultwhich has the DAV properties which were returned by the property find method.- Throws:
DAVException- in the case of server failures.RemoteException- in the case of network failures.- Since:
- 9.4m8
- See Also:
-
getDavProperties
Gets all of the DAV resource's properties for the specified depth.- Parameters:
depth- The depth on which DAV operations will be based. Specify one ofDavConstants.DEPTH_0orDavConstants.DEPTH_1orDavConstants.DEPTH_INFINITY.- Returns:
DavPropertyResultwhich has the DAV properties which were returned by the property find method.- Throws:
DAVException- in the case of server failures.RemoteException- in the case of network failures.- Since:
- 9.4m8
- See Also:
-
getDavProperties
DavPropertyResult getDavProperties(org.apache.jackrabbit.webdav.property.DavPropertyNameSet davPropertyNameSet, int depth) throws DAVException, RemoteException Gets the properties for the specified DAV property names and search depth.- Parameters:
davPropertyNameSet- Set of the names of the DAV properties which should be returned.depth- The depth on which DAV operations will be based. Specify one ofDavConstants.DEPTH_0orDavConstants.DEPTH_1orDavConstants.DEPTH_INFINITY.- Returns:
DavPropertyResultwhich has the DAV properties which were returned by the property find method.- Throws:
DAVException- in the case of server failures.RemoteException- in the case of network failures.- Since:
- 9.4m8
-
getDavProperties
DavPropertyResult getDavProperties(PropertyName[] propertyNames) throws DAVException, RemoteException Gets all the properties for the specified property names on the DAV resource.- Parameters:
propertyNames- Array of property names, specifying which properties should be returned.- Returns:
DavPropertyResultwhich has the DAV properties which were returned by the property find method.- Throws:
DAVException- in the case of server failures.RemoteException- in the case of network failures.- Since:
- 9.4m8
-
getDavProperties
DavPropertyResult getDavProperties(PropertyName[] propertyNames, int depth) throws DAVException, RemoteException Gets all the properties for the specified property names on the DAV resource.- Parameters:
propertyNames- Array of property names, specifying which properties should be returned.depth- The depth on which DAV operations will be based. Specify one ofDavConstants.DEPTH_0orDavConstants.DEPTH_1orDavConstants.DEPTH_INFINITY.- Returns:
DavPropertyResultwhich has the DAV properties which were returned by the property find method.- Throws:
DAVException- in the case of server failures.RemoteException- in the case of network failures.- Since:
- 9.4m8
-
getDavPropertyNames
Gets DAV properties for all of a DAV resource's property names.- Returns:
DavPropertyResultwhich has the DAV properties which were returned by the property find method.- Throws:
DAVException- in the case of server failures.RemoteException- in the case of network failures.- Since:
- 9.4m8
- See Also:
-
getDavPropertyNames
Gets DAV properties for all of a DAV resource's property names for the specified depth.- Parameters:
depth-- Returns:
DavPropertyResultwhich has the DAV properties which were returned by the property find method.- Throws:
DAVException- in the case of server failures.RemoteException- in the case of network failures.- See Also:
-
doReport
DavPropertyResult doReport(org.apache.jackrabbit.webdav.version.report.ReportInfo reportInfo) throws DAVException, RemoteException Gets a report on the current DAV resource. TheReportInfoparameter specifies the following information.- report type
- depth
- property names
- Parameters:
reportInfo- Information which specifies the desired report.- Returns:
DavPropertyResultwhich has the DAV properties which were returned by the property report method.- Throws:
DAVException- in the case of server failures.RemoteException- in the case of network failures.- Since:
- 9.4m8
-
doSearch
DavPropertyResult doSearch(org.apache.jackrabbit.webdav.search.SearchInfo searchInfo) throws DAVException, RemoteException The SEARCH method invokes one of the implemented search grammars on the server to evaluate the query.- Parameters:
searchInfo- The search criteria.- Returns:
DavPropertyResultwhich has the DAV properties which were returned by the property find method.- Throws:
DAVException- in the case of server failures.RemoteException- in the case of network failures.- Since:
- 9.4m8
-