public class AnywherePathAPI
extends java.lang.Object
See the method AnywhereAPI.getPathAPI() to obtain an instance of the AnywherePathAPI.
| Modifier and Type | Field and Description |
|---|---|
static boolean |
DEFAULT_CREATE_PARENTS
The default value to use for createParents on
move(com.hds.hcpaw.fss.api.model.AuthToken, String, String, String) operations. |
static boolean |
DEFAULT_RECURSIVE_DELETE
The default value to use for recursive on
delete(com.hds.hcpaw.fss.api.model.AuthToken, String, String) operations. |
| Modifier | Constructor and Description |
|---|---|
protected |
AnywherePathAPI(AnywhereConnector connector) |
| Modifier and Type | Method and Description |
|---|---|
void |
delete(AuthToken authToken,
java.lang.String path,
java.lang.String etag)
Calls
delete(com.hds.hcpaw.fss.api.model.AuthToken, String, String, boolean) with
DEFAULT_RECURSIVE_DELETE (false) as the value for
recursive. |
void |
delete(AuthToken authToken,
java.lang.String path,
java.lang.String etag,
boolean recursive)
Deletes a file or folder at the specified path.
|
Entry |
getInfo(AuthToken authToken,
java.lang.String path)
Returns information (metadata) about the file or folder at the specified path.
|
Entry |
getInfo(AuthToken authToken,
java.lang.String path,
boolean includeDeleted)
Returns information (metadata) about the file or folder at the specified path.
|
LinkListing |
listLinks(AuthToken authToken,
java.lang.String path)
List all non-expired links for a specified path.
|
Entry |
move(AuthToken authToken,
java.lang.String sourcePath,
java.lang.String destPath,
java.lang.String etag)
Calls
move(com.hds.hcpaw.fss.api.model.AuthToken, String, String, String, boolean)
with DEFAULT_CREATE_PARENTS (false) as the value for
createParents. |
Entry |
move(AuthToken authToken,
java.lang.String sourcePath,
java.lang.String destPath,
java.lang.String etag,
boolean createParents)
Deletes the entry currently at sourcePath (and all of its children if the path refers to a
folder), and creates the entry (and all of its children if path refers to a folder) at
destPath.
|
MultiDeletePathResult |
multiDelete(AuthToken authToken,
java.util.List<EntryIdentifier> entryList,
java.lang.Boolean recursive)
Deletes multiple files or folders based on (path, etag) pairs passed in.
|
PathSearchResult |
search(AuthToken authToken,
java.lang.String path,
java.lang.String substring,
java.lang.Integer maxResults)
Searches for entries with a matching substring in their name under the specified path.
|
PathSearchResult |
search(AuthToken authToken,
java.lang.String path,
java.lang.String substring,
java.lang.Integer maxResults,
java.lang.Boolean includeDeleted,
java.lang.Long pointInTime)
Searches for entries with a matching substring in their name under the specified path.
|
public static final boolean DEFAULT_RECURSIVE_DELETE
delete(com.hds.hcpaw.fss.api.model.AuthToken, String, String) operations. Has a
value of false.public static final boolean DEFAULT_CREATE_PARENTS
move(com.hds.hcpaw.fss.api.model.AuthToken, String, String, String) operations. Has
a value of false.protected AnywherePathAPI(AnywhereConnector connector)
public void delete(AuthToken authToken, java.lang.String path, java.lang.String etag) throws AwUnsupportedApiVersionException, java.io.IOException, AnywhereException
delete(com.hds.hcpaw.fss.api.model.AuthToken, String, String, boolean) with
DEFAULT_RECURSIVE_DELETE (false) as the value for
recursive.AwUnsupportedApiVersionExceptionjava.io.IOExceptionAnywhereExceptionpublic void delete(AuthToken authToken, java.lang.String path, java.lang.String etag, boolean recursive) throws AwUnsupportedApiVersionException, java.io.IOException, AnywhereException
authToken - authentication token for the user performing the requestpath - path to the file or folder being deletedetag - the etag of the file being deleted. The operation fails if there is not a file
with this etag at the specified pathrecursive - ignored if the specified path is a file. For folders, if true, then all the files
and folders in the folder are also deleted. If false, and there are files or
folders in the folder, the operation failsAwUnsupportedApiVersionException - if this method is not supported by the server due to the server's supported API
versionsAwNotFoundException - if path does not existAwDirectoryNotEmptyException - if recursive is false and path is a non-empty folderjava.io.IOExceptionAnywhereExceptionpublic MultiDeletePathResult multiDelete(AuthToken authToken, java.util.List<EntryIdentifier> entryList, java.lang.Boolean recursive) throws AwUnsupportedApiVersionException, java.io.IOException, AnywhereException
authToken - authentication token for the user performing the requestentryList - The list of (path, etag) pairs to delete.recursive - ignored if the specified path is a file. For folders, if true, then all the
files and folders in the folder are also deleted. If false, and there are files or
folders in the folder, the operation failsAwUnsupportedApiVersionException - if this method is
not supported by the server due to the server's supported API versionsAwNotFoundException - if path does not existAwDirectoryNotEmptyException - if recursive is false
and path is a non-empty folderjava.io.IOExceptionAnywhereExceptionpublic Entry move(AuthToken authToken, java.lang.String sourcePath, java.lang.String destPath, java.lang.String etag) throws AwUnsupportedApiVersionException, java.io.IOException, AnywhereException
move(com.hds.hcpaw.fss.api.model.AuthToken, String, String, String, boolean)
with DEFAULT_CREATE_PARENTS (false) as the value for
createParents.AwUnsupportedApiVersionExceptionjava.io.IOExceptionAnywhereExceptionpublic Entry move(AuthToken authToken, java.lang.String sourcePath, java.lang.String destPath, java.lang.String etag, boolean createParents) throws AwUnsupportedApiVersionException, java.io.IOException, AnywhereException
authToken - authentication token for the user performing the requestsourcePath - current path (including file or folder name) of the file or folder to be moveddestPath - path where the file or folder will be movedetag - the etag of the file or folder being moved. The operation fails if there is not a
file or folder with this etag at the specified path.createParents - if true, then any parent folders of destPath that do not already exist will be
created. If false, then the operation will fail if any parent folders of destPath
do not exist.AwUnsupportedApiVersionException - if this method is not supported by the server due to the server's supported API
versionsAwNotFoundException - if sourcePath does not exist or if the parent of destPath does not exist and
createParents is falseAwEntryVersionMismatchException - if the provided etag does not match the etag on the serverjava.io.IOExceptionAnywhereExceptionpublic Entry getInfo(AuthToken authToken, java.lang.String path) throws AwUnsupportedApiVersionException, java.io.IOException, AnywhereException
authToken - authentication token for the user performing the requestpath - path (including file or folder name) of the file or folder to return metadata
aboutAwUnsupportedApiVersionException - if sourcePath does not exist or if the parent of destPath does not exist and
createParents is falsejava.io.IOExceptionAnywhereExceptionpublic Entry getInfo(AuthToken authToken, java.lang.String path, boolean includeDeleted) throws AwUnsupportedApiVersionException, java.io.IOException, AnywhereException
authToken - authentication token for the user performing the requestpath - path (including file or folder name) of the file or folder to return metadata
aboutincludeDeleted - whether to include deleted itemAwUnsupportedApiVersionException - if sourcePath does
not exist or if the parent of destPath does not exist and createParents is falsejava.io.IOExceptionAnywhereExceptionpublic PathSearchResult search(AuthToken authToken, java.lang.String path, java.lang.String substring, java.lang.Integer maxResults) throws AwUnsupportedApiVersionException, java.io.IOException, AnywhereException
authToken - authentication token for the user performing the request.path - path under which to search for entries matching the substring. If path is a
folder, all subfolders are searched as well.substring - the substring to match file or folder names against. Must be at least three
characters long.maxResults - the maximum number of results that will be returned. If null, then the value
defaults to
100.AwUnsupportedApiVersionException - if this method is not supported by the server due to the server's supported API
versionsjava.io.IOExceptionAnywhereExceptionpublic PathSearchResult search(AuthToken authToken, java.lang.String path, java.lang.String substring, java.lang.Integer maxResults, java.lang.Boolean includeDeleted, java.lang.Long pointInTime) throws AwUnsupportedApiVersionException, java.io.IOException, AnywhereException
authToken - authentication token for the user performing the request.path - path under which to search for entries matching the substring. If path is a
folder, all subfolders are searched as well.substring - the substring to match file or folder names against. Must be at least three
characters long.maxResults - the maximum number of results that will be returned. If null, then the value
defaults to
100.includeDeleted - whether or not to include deleted entries in the search. If null, defaults to
false.pointInTime - the point in time to search for the entry. If null, defaults to the current time.AwUnsupportedApiVersionException - if this method is not supported by the server due to the server's supported API
versionsjava.io.IOExceptionAnywhereExceptionpublic LinkListing listLinks(AuthToken authToken, java.lang.String path) throws AwUnsupportedApiVersionException, java.io.IOException, AnywhereException
authToken - authentication token for the user performing the request.path - path to the file or folder to list links for.AwUnsupportedApiVersionExceptionjava.io.IOExceptionAnywhereException