Interface DocumentWebDavService
public interface DocumentWebDavService
-
Method Summary
Modifier and TypeMethodDescriptionvoidWebdav CheckIn of a given resource in order to prepare generation of a versionvoidWebdav CheckOut of a given resource in order to generate a versionvoidcopy(String resourcePath, String destinationPath, int depth, boolean overwrite, boolean removeDestination, WebDavItemProperty webDavItemProperty, List<String> lockTokens, String username) Webdav COPY of a given resource into a designated resource pathvoidcreateFolder(String resourcePath, String folderType, String contentNodeType, String mixinTypes, List<String> lockTokens, String username) Creates a new folder in the designated locationvoidWebdav DELETE of a given resourceWebdav GET of a given resourcevoidenableVersioning(String resourcePath, List<String> lockTokens, String username) Enables Versioning on the designated resourceget(String resourcePath, String propRequestType, Set<QName> requestedPropertyNames, boolean requestPropertyNamesOnly, int depth, String baseUri, String username) longgetLastModifiedDate(String resourcePath, String version) getVersions(String resourcePath, Set<QName> requestedPropertyNames, String baseUri, String username) booleanlock(String resourcePath, int depth, int lockTimeout, boolean bodyIsEmpty, List<String> lockTokens, String username) Add a lock on a designated resourcebooleanmove(String resourcePath, String destinationPath, boolean overwrite, List<String> lockTokens, String username) booleanvoidsaveFile(String resourcePath, String fileType, String contentNodeType, String mediaType, String mixinTypes, InputStream inputStream, List<String> lockTokens, String username) Creates or Updates a designated resourcesaveProperties(String resourcePath, List<WebDavItemProperty> propertiesToSave, List<WebDavItemProperty> propertiesToRemove, List<String> lockTokens, String username) Create, update and delete properties of a designated resourcevoiduncheckout(String resourcePath, List<String> lockTokens, String username) voidRemoves a previously added lock from a designated resource
-
Method Details
-
getNamespaceContext
NamespaceContext getNamespaceContext()- Returns:
NamespaceContext,which will be used to write XML namespaces in resulted responses
-
getDaslValue
String getDaslValue()- Returns:
- HTTP 1.1 "Allow" header. See WebDAV/DASL Request and Response Syntax for more information.
-
isFile
- Parameters:
resourcePath- File or Folder Path- Returns:
- true if the resource designated by the path is a file, else false
-
download
WebDavFileDownload download(String resourcePath, String version, String baseUri, String username) throws WebDavException Webdav GET of a given resource- Parameters:
resourcePath- File or Folder Pathversion- Resource VersionbaseUri- Base Request URIusername- user login accessing the resource- Returns:
WebDavFileDownloadcontaining the content of the file- Throws:
WebDavException- when:- - Parameters aren't compliant to expected method inputs
- - The user doesn't have access to designated resource
- - The designated resource isn't found
-
get
WebDavItem get(String resourcePath, String propRequestType, Set<QName> requestedPropertyNames, boolean requestPropertyNamesOnly, int depth, String baseUri, String username) throws WebDavException - Parameters:
resourcePath- File or Folder PathpropRequestType- Requested properties retrieval typerequestedPropertyNames- Requested property namesrequestPropertyNamesOnly- whether to get property names only or with the associated value(s)depth- resources retireval depthbaseUri- Base Request URIusername- user login accessing the resource- Returns:
WebDavItemcorresponding to the requested resource- Throws:
WebDavException
-
createFolder
void createFolder(String resourcePath, String folderType, String contentNodeType, String mixinTypes, List<String> lockTokens, String username) throws WebDavException Creates a new folder in the designated location- Parameters:
resourcePath- Folder Path to createfolderType- Folder TypecontentNodeType- Content Node TypemixinTypes- Folder Mixin TypeslockTokens- Already Hold Lock Tokens by the WebDav Sessionusername- user login making the changes- Throws:
WebDavException- when:- - Parameters aren't compliant to expected method inputs
- - The user doesn't have access to designated resource
- - The designated resource isn't found
- - The designated resource is locked
-
saveFile
void saveFile(String resourcePath, String fileType, String contentNodeType, String mediaType, String mixinTypes, InputStream inputStream, List<String> lockTokens, String username) throws WebDavException Creates or Updates a designated resource- Parameters:
resourcePath- File or Folder PathfileType- File TypecontentNodeType- Content Node TypemediaType- File Media TypemixinTypes- Mixin TypesinputStream- File contentlockTokens- Already Hold Lock Tokens by the WebDav Sessionusername- user login making the changes- Throws:
WebDavException- when:- - Parameters aren't compliant to expected method inputs
- - The user doesn't have access to designated resource
- - The designated parent of the resource isn't found
- - The designated resource is locked
-
saveProperties
Map<String,Collection<WebDavItemProperty>> saveProperties(String resourcePath, List<WebDavItemProperty> propertiesToSave, List<WebDavItemProperty> propertiesToRemove, List<String> lockTokens, String username) throws WebDavException Create, update and delete properties of a designated resource- Parameters:
resourcePath- File or Folder PathpropertiesToSave-Listof properties to savepropertiesToRemove-Listof properties to removelockTokens- Already Hold Lock Tokens by the WebDav Sessionusername- user login making the changes- Returns:
Mapof result of changes by type of result (Http Status) and list of properties- Throws:
WebDavException
-
delete
Webdav DELETE of a given resource- Parameters:
resourcePath- File or Folder PathlockTokens- Already Hold Lock Tokens by the WebDav Sessionusername- user login making the changes- Throws:
WebDavException- when:- - Parameters aren't compliant to expected method inputs
- - The user doesn't have access to designated resource
- - The designated resource isn't found
-
copy
void copy(String resourcePath, String destinationPath, int depth, boolean overwrite, boolean removeDestination, WebDavItemProperty webDavItemProperty, List<String> lockTokens, String username) throws WebDavException Webdav COPY of a given resource into a designated resource path- Parameters:
resourcePath- File or Folder PathdestinationPath- File destination Pathdepth- resources copy depthoverwrite- whether to overwrite existing file if exists or notremoveDestination- whether to remove destination if exists or notwebDavItemProperty-WebDavItemPropertylockTokens- Already Hold Lock Tokens by the WebDav Sessionusername- user login making the changes- Throws:
WebDavException- when:- - Parameters aren't compliant to expected method inputs
- - The user doesn't have access to designated resource
- - The designated resource isn't found
- - The destination designated resource path already exists and overwrite = false
-
move
boolean move(String resourcePath, String destinationPath, boolean overwrite, List<String> lockTokens, String username) throws WebDavException - Parameters:
resourcePath- File or Folder PathdestinationPath- File destination Pathoverwrite- whether to overwrite existing file if exists or notlockTokens- Already Hold Lock Tokens by the WebDav Sessionusername- user login making the changes- Returns:
- true if item already exists and was replaced else false
- Throws:
WebDavException- when:- - Parameters aren't compliant to expected method inputs
- - The user doesn't have access to designated resources
- - The designated source resource isn't found
- - The destination designated resource path already exists and overwrite = false
-
order
boolean order(String resourcePath, List<WebDavItemOrder> members, List<String> lockTokens, String username) throws WebDavException - Parameters:
resourcePath- File or Folder Pathmembers-ListofWebDavItemOrderas identified members from WebDav clientlockTokens- Already Hold Lock Tokens by the WebDav Sessionusername- user login making the changes- Returns:
- true if order change applied else false
- Throws:
WebDavException
-
search
List<WebDavItem> search(String resourcePath, String queryLanguage, String query, String baseUri, String username) - Parameters:
resourcePath- File or Folder PathqueryLanguage- Query language (XPath or SQL)query- QuerybaseUri- Base Request URIusername- user login making the changes- Returns:
ListofWebDavItem
-
enableVersioning
void enableVersioning(String resourcePath, List<String> lockTokens, String username) throws WebDavException Enables Versioning on the designated resource- Parameters:
resourcePath- File or Folder PathlockTokens- Already Hold Lock Tokens by the WebDav Sessionusername- user login making the changes- Throws:
WebDavException- when:- - The user doesn't have access to designated resource
- - The designated resource isn't found
- - The designated resource is locked
-
getVersions
List<WebDavItem> getVersions(String resourcePath, Set<QName> requestedPropertyNames, String baseUri, String username) - Parameters:
resourcePath- File or Folder PathrequestedPropertyNames- Requested property namesbaseUri- Base Request URIusername- user login making the changes- Returns:
ListofWebDavItemrepresenting the item versions
-
checkin
Webdav CheckIn of a given resource in order to prepare generation of a version- Parameters:
resourcePath- File or Folder PathlockTokens- Already Hold Lock Tokens by the WebDav Sessionusername- user login making the changes- Throws:
WebDavException- when:- - Parameters aren't compliant to expected method inputs
- - The user doesn't have access to designated resource
- - The designated resource isn't found
- - The designated resource is already checked in
- - The designated resource is locked
-
checkout
Webdav CheckOut of a given resource in order to generate a version- Parameters:
resourcePath- File or Folder PathlockTokens- Already Hold Lock Tokens by the WebDav Sessionusername- user login making the changes- Throws:
WebDavException- when:- - Parameters aren't compliant to expected method inputs
- - The user doesn't have access to designated resource
- - The designated resource isn't found
- - The designated resource is already checked out
-
uncheckout
void uncheckout(String resourcePath, List<String> lockTokens, String username) throws WebDavException - Parameters:
resourcePath- File or Folder PathlockTokens- Already Hold Lock Tokens by the WebDav Sessionusername- user login making the changes- Throws:
WebDavException- when:- - Parameters aren't compliant to expected method inputs
- - The user doesn't have access to designated resource
- - The designated resource isn't found
- - The designated resource is not checked out
-
getLastModifiedDate
- Parameters:
resourcePath- File or Folder Pathversion- File version- Returns:
- last Modified Date of a resource designated by its path
- Throws:
WebDavException- when:- - Parameters aren't compliant to expected method inputs
- - The designated resource isn't found
-
lock
WebDavLockResponse lock(String resourcePath, int depth, int lockTimeout, boolean bodyIsEmpty, List<String> lockTokens, String username) throws WebDavException Add a lock on a designated resource- Parameters:
resourcePath- File or Folder Pathdepth- resources copy depthlockTimeout- Lock timeoutbodyIsEmpty- whether the body doesn't exists or notlockTokens- Already Hold Lock Tokens by the WebDav Sessionusername- user login making the changes- Returns:
WebDavLockResponse- Throws:
WebDavException- when:- - Parameters aren't compliant to expected method inputs
- - The designated resource is locked
-
unlock
Removes a previously added lock from a designated resource- Parameters:
resourcePath- File or Folder PathlockTokens- Already Hold Lock Tokens by the WebDav Sessionusername- user login making the changes- Throws:
WebDavException
-