public class DocLibClient extends SharePointClient
| Constructor and Description |
|---|
DocLibClient(java.lang.String serverUrl,
java.lang.String siteRelativeUrl,
Credentials credentials)
Instantiates a new file API client.
|
DocLibClient(java.lang.String serverUrl,
java.lang.String siteRelativeUrl,
Credentials credentials,
Logger logger)
Instantiates a new file client.
|
| Modifier and Type | Method and Description |
|---|---|
com.google.common.util.concurrent.ListenableFuture<java.lang.Void> |
copy(java.lang.String sourcePath,
java.lang.String destinationPath,
boolean overwrite)
Copies an item from the given sourcePath to the given destinationPath.
|
com.google.common.util.concurrent.ListenableFuture<java.lang.Void> |
copy(java.lang.String sourcePath,
java.lang.String destinationPath,
boolean overwrite,
java.lang.String library)
Copies an item from the given sourcePath to the given destinationPath.
|
com.google.common.util.concurrent.ListenableFuture<FileSystemItem> |
createFile(java.lang.String fileName)
Creates an empty file.
|
com.google.common.util.concurrent.ListenableFuture<FileSystemItem> |
createFile(java.lang.String fileName,
boolean overwrite,
byte[] content)
Creates the file with a given file name and content
|
com.google.common.util.concurrent.ListenableFuture<FileSystemItem> |
createFile(java.lang.String fileName,
java.lang.String library)
Creates an empty file.
|
com.google.common.util.concurrent.ListenableFuture<FileSystemItem> |
createFile(java.lang.String fileName,
java.lang.String library,
boolean overwrite,
byte[] content)
Creates a file with a given path inside a given library
|
com.google.common.util.concurrent.ListenableFuture<FileSystemItem> |
createFolder(java.lang.String path)
Creates the folder with a given path
|
com.google.common.util.concurrent.ListenableFuture<FileSystemItem> |
createFolder(java.lang.String path,
java.lang.String library)
Creates a folder with a given path and library
|
com.google.common.util.concurrent.ListenableFuture<java.lang.Void> |
delete(java.lang.String path)
Delete a file/folder with a given path
|
com.google.common.util.concurrent.ListenableFuture<java.lang.Void> |
delete(java.lang.String path,
java.lang.String library)
Deletes a file/folder with a given path and library
|
com.google.common.util.concurrent.ListenableFuture<byte[]> |
getFile(java.lang.String path)
Gets the file.
|
com.google.common.util.concurrent.ListenableFuture<byte[]> |
getFile(java.lang.String path,
java.lang.String library)
Gets the file.
|
com.google.common.util.concurrent.ListenableFuture<FileSystemItem> |
getFileSystemItem(java.lang.String path) |
com.google.common.util.concurrent.ListenableFuture<FileSystemItem> |
getFileSystemItem(java.lang.String path,
java.lang.String library)
Get a FileSystemItem from a path in a document library
|
com.google.common.util.concurrent.ListenableFuture<java.util.List<FileSystemItem>> |
getFileSystemItems()
Gets a list of FileSystemItem from the default Document Library
|
com.google.common.util.concurrent.ListenableFuture<java.util.List<FileSystemItem>> |
getFileSystemItems(java.lang.String path,
java.lang.String library)
Gets children folder with a given path
|
com.google.common.util.concurrent.ListenableFuture<java.lang.Object> |
getProperty(java.lang.String property,
java.lang.String path)
Gets the value of a given property with a given path
|
com.google.common.util.concurrent.ListenableFuture<java.lang.Object> |
getProperty(java.lang.String property,
java.lang.String path,
java.lang.String library)
Retrieves the value of property with a given path and library
|
com.google.common.util.concurrent.ListenableFuture<java.lang.Void> |
move(java.lang.String sourcePath,
java.lang.String destinationPath,
boolean overwrite)
Moves an item from the given sourcePath to the given destinationPath.
|
com.google.common.util.concurrent.ListenableFuture<java.lang.Void> |
move(java.lang.String sourcePath,
java.lang.String destinationPath,
boolean overwrite,
java.lang.String library)
Moves an item from the given sourcePath to the given destinationPath.
|
executeRequestJsonWithDigest, getFormDigest, getServerUrl, getSiteRelativeUrl, getSiteUrl, getUserByID, getWebTitleexecuteRequest, executeRequest, executeRequestJson, executeRequestJson, generateODataQueryString, getCredentials, getDiscoveryInfo, getDiscoveryInfo, getLogger, isValidStatus, log, log, prepareRequest, queryEncode, urlEncode, UUIDtoStringpublic DocLibClient(java.lang.String serverUrl,
java.lang.String siteRelativeUrl,
Credentials credentials)
serverUrl - credentials - public DocLibClient(java.lang.String serverUrl,
java.lang.String siteRelativeUrl,
Credentials credentials,
Logger logger)
serverUrl - siteRelativeUrl - credentials - logger - public com.google.common.util.concurrent.ListenableFuture<java.util.List<FileSystemItem>> getFileSystemItems()
public com.google.common.util.concurrent.ListenableFuture<java.util.List<FileSystemItem>> getFileSystemItems(java.lang.String path, java.lang.String library)
path - public com.google.common.util.concurrent.ListenableFuture<FileSystemItem> getFileSystemItem(java.lang.String path)
public com.google.common.util.concurrent.ListenableFuture<FileSystemItem> getFileSystemItem(java.lang.String path, java.lang.String library)
library - the document librarypath - the pathpublic com.google.common.util.concurrent.ListenableFuture<java.lang.Object> getProperty(java.lang.String property,
java.lang.String path,
java.lang.String library)
property - path - library - public com.google.common.util.concurrent.ListenableFuture<java.lang.Object> getProperty(java.lang.String property,
java.lang.String path)
path - property - public com.google.common.util.concurrent.ListenableFuture<byte[]> getFile(java.lang.String path)
path - public com.google.common.util.concurrent.ListenableFuture<byte[]> getFile(java.lang.String path,
java.lang.String library)
path - public com.google.common.util.concurrent.ListenableFuture<FileSystemItem> createFolder(java.lang.String path)
path - public com.google.common.util.concurrent.ListenableFuture<FileSystemItem> createFolder(java.lang.String path, java.lang.String library)
path - library - public com.google.common.util.concurrent.ListenableFuture<FileSystemItem> createFile(java.lang.String fileName)
fileName - public com.google.common.util.concurrent.ListenableFuture<FileSystemItem> createFile(java.lang.String fileName, java.lang.String library)
fileName - public com.google.common.util.concurrent.ListenableFuture<FileSystemItem> createFile(java.lang.String fileName, java.lang.String library, boolean overwrite, byte[] content)
fileName - library - overwrite - content - public com.google.common.util.concurrent.ListenableFuture<FileSystemItem> createFile(java.lang.String fileName, boolean overwrite, byte[] content)
fileName - The fileoverwrite - True to overwritecontent - The contentpublic com.google.common.util.concurrent.ListenableFuture<java.lang.Void> delete(java.lang.String path)
path - public com.google.common.util.concurrent.ListenableFuture<java.lang.Void> delete(java.lang.String path,
java.lang.String library)
path - The pathlibrary - The librarypublic com.google.common.util.concurrent.ListenableFuture<java.lang.Void> move(java.lang.String sourcePath,
java.lang.String destinationPath,
boolean overwrite)
sourcePath - destinationPath - overwrite - public com.google.common.util.concurrent.ListenableFuture<java.lang.Void> move(java.lang.String sourcePath,
java.lang.String destinationPath,
boolean overwrite,
java.lang.String library)
overwrite - flagpublic com.google.common.util.concurrent.ListenableFuture<java.lang.Void> copy(java.lang.String sourcePath,
java.lang.String destinationPath,
boolean overwrite)
sourcePath - destinationPath - the destination pathoverwrite - public com.google.common.util.concurrent.ListenableFuture<java.lang.Void> copy(java.lang.String sourcePath,
java.lang.String destinationPath,
boolean overwrite,
java.lang.String library)
sourcePath - destinationPath - the destination pathoverwrite -