public class AnywhereLinkAPI
extends java.lang.Object
See the method AnywhereAPI.getLinkAPI() to obtain an instance of
the AnywhereLinkAPI.
| Modifier | Constructor and Description |
|---|---|
protected |
AnywhereLinkAPI(AnywhereConnector connector) |
| Modifier and Type | Method and Description |
|---|---|
LinkBrowseListing |
browsePrivateLink(AuthToken authToken,
java.lang.String linkToken,
java.lang.String itemName,
java.lang.String accessCode,
java.lang.String path,
java.lang.String pageToken,
int pageSize,
FolderListingRequest.SortingCriterion sortingCriterion,
FolderListingRequest.SortingDirection sortingDirection)
Browse a private link
|
LinkBrowseListing |
browsePublicLink(AuthToken authToken,
java.lang.String linkToken,
java.lang.String itemName,
java.lang.String accessCode,
java.lang.String path,
java.lang.String pageToken,
int pageSize,
FolderListingRequest.SortingCriterion sortingCriterion,
FolderListingRequest.SortingDirection sortingDirection)
Browse a public link
|
void |
copyFilesToLocalPrivateLink(AuthToken authToken,
java.lang.String linkToken,
java.lang.String itemName,
java.lang.String accessCode,
java.util.List<java.lang.String> pathList,
java.lang.String destinationPath)
Copy files to local from a private link
|
void |
copyFilesToLocalPublicLink(AuthToken authToken,
java.lang.String linkToken,
java.lang.String itemName,
java.lang.String accessCode,
java.util.List<java.lang.String> pathList,
java.lang.String destinationPath)
Copy files to local from a public link
|
Link |
create(AuthToken authToken,
java.lang.String path,
java.lang.Integer expirationDays,
java.lang.Boolean publicLink,
boolean accessCode,
java.util.Set<LinkPermission> permissions)
Deprecated.
|
Link |
create(AuthToken authToken,
java.lang.String path,
java.lang.Integer expirationDays,
java.lang.Boolean publicLink,
boolean accessCode,
java.util.Set<LinkPermission> permissions,
java.lang.String uniqueId)
Creates a link to the file or folder using it's Unique ID
|
Entry |
createFilePrivateLink(AuthToken authToken,
java.lang.String linkToken,
java.lang.String itemName,
java.lang.String accessCode,
java.lang.String path,
java.lang.Long size,
java.lang.String hash,
java.lang.Boolean createParents,
java.io.InputStream contentIn)
Upload a file to a private link with upload access
|
Entry |
createFilePublicLink(AuthToken authToken,
java.lang.String linkToken,
java.lang.String itemName,
java.lang.String accessCode,
java.lang.String path,
java.lang.Long size,
java.lang.String hash,
java.lang.Boolean createParents,
java.io.InputStream contentIn)
Upload a file to a public link with upload access
|
void |
delete(AuthToken authToken,
java.lang.String url)
Deletes the specified link.
|
void |
delete(AuthToken authToken,
java.lang.String path,
java.lang.String url)
Deprecated.
|
Entry |
getPrivateLinkPathMetadata(AuthToken authToken,
java.lang.String linkToken,
java.lang.String itemName,
java.lang.String accessCode,
java.lang.String path)
Read entry metadata from private link
|
Entry |
getPublicLinkPathMetadata(AuthToken authToken,
java.lang.String linkToken,
java.lang.String itemName,
java.lang.String accessCode,
java.lang.String path)
Read entry metadata from public link
|
LinkListing |
list(AuthToken authToken)
List a user's links
|
LinkListing |
list(AuthToken authToken,
java.lang.String filter,
java.lang.String pageToken,
java.lang.Integer pageSize,
LinkListRequest.LinkSortingCriterion sortingCriterion,
FolderListingRequest.SortingDirection sortingDirection)
List a user's links.
|
void |
multiFileDownloadPrivateLink(AuthToken authToken,
java.util.List<java.lang.String> pathList,
java.lang.String linkToken,
java.lang.String itemName,
java.lang.String accessCode,
java.io.OutputStream out)
Download multiple files as zip from a private link
|
void |
multiFileDownloadPublicLink(AuthToken authToken,
java.util.List<java.lang.String> pathList,
java.lang.String linkToken,
java.lang.String itemName,
java.lang.String accessCode,
java.io.OutputStream out)
Download multiple files as zip from a public link
|
Entry |
readFilePrivateLink(AuthToken authToken,
java.lang.String linkToken,
java.lang.String itemName,
java.lang.String accessCode,
java.lang.String path,
java.lang.String etag,
java.io.OutputStream out)
Read file from a private link
|
Entry |
readFilePublicLink(AuthToken authToken,
java.lang.String linkToken,
java.lang.String itemName,
java.lang.String accessCode,
java.lang.String path,
java.lang.String etag,
java.io.OutputStream out)
Read file from a public link
|
Link |
update(AuthToken authToken,
java.lang.String url,
boolean updateAccessCode,
java.lang.Long expirationDate)
Update the link
|
Link |
update(AuthToken authToken,
java.lang.String path,
java.lang.String url,
boolean updateAccessCode,
java.lang.Long expirationDate)
Deprecated.
|
Entry |
updateFilePrivateLink(AuthToken authToken,
java.lang.String linkToken,
java.lang.String itemName,
java.lang.String accessCode,
java.lang.String path,
java.lang.Long size,
java.lang.String hash,
java.lang.String etag,
java.io.InputStream contentIn)
Update file through a private link
|
Entry |
updateFilePublicLink(AuthToken authToken,
java.lang.String linkToken,
java.lang.String itemName,
java.lang.String accessCode,
java.lang.String path,
java.lang.Long size,
java.lang.String hash,
java.lang.String etag,
java.io.InputStream contentIn)
Update file through a public link
|
protected AnywhereLinkAPI(AnywhereConnector connector)
@Deprecated public Link create(AuthToken authToken, java.lang.String path, java.lang.Integer expirationDays, java.lang.Boolean publicLink, boolean accessCode, java.util.Set<LinkPermission> permissions) throws AwUnsupportedApiVersionException, java.io.IOException, AnywhereException
authToken - authentication token for the user performing the requestpath - path (including file name) where the link is to be createdexpirationDays - optionally, the number of days that the link remains active. If null,
then the default number of days from the server will be usedpublicLink - optionally, whether the link is publicly accessible (accessible without
providing login credentials). If null, then the server default will be usedaccessCode - whether to protect the link with an access codepermissions - the permissions for this link (read, write)AwUnsupportedApiVersionException - if this method is
not supported by the server due to the server's supported API versionsAwNotFoundException - if the path does not existAwInvalidRequestException - if the request is invalid;
for example, if the expiration is invalid or if you try to create an upload link
to a file,java.io.IOExceptionAnywhereExceptionpublic Link create(AuthToken authToken, java.lang.String path, java.lang.Integer expirationDays, java.lang.Boolean publicLink, boolean accessCode, java.util.Set<LinkPermission> permissions, java.lang.String uniqueId) throws AwUnsupportedApiVersionException, java.io.IOException, AnywhereException
authToken - authentication token for the user performing the requestexpirationDays - optionally, the number of days that the link remains active. If null,
then the default number of days from the server will be usedpublicLink - optionally, whether the link is publicly accessible (accessible without
providing login credentials). If null, then the server default will be usedaccessCode - whether to protect the link with an access codepermissions - the permissions for this link (read, write)uniqueId - unique id of the file or folder where the link is to be createdAwUnsupportedApiVersionException - if this method is
not supported by the server due to the server's supported API versionsAwNotFoundException - if the path does not existAwInvalidRequestException - if the request is invalid;
for example, if the expiration is invalid or if you try to create an upload link
to a file,java.io.IOExceptionAnywhereException@Deprecated public void delete(AuthToken authToken, java.lang.String path, java.lang.String url) throws AwUnsupportedApiVersionException, java.io.IOException, AnywhereException
authToken - authentication token for the user performing the requestpath - path (including file name) of the linkurl - url of the linkAwUnsupportedApiVersionExceptionjava.io.IOExceptionAnywhereExceptionpublic void delete(AuthToken authToken, java.lang.String url) throws AwUnsupportedApiVersionException, java.io.IOException, AnywhereException
authToken - authentication token for the user performing the requesturl - url of the linkAwUnsupportedApiVersionExceptionjava.io.IOExceptionAnywhereException@Deprecated public Link update(AuthToken authToken, java.lang.String path, java.lang.String url, boolean updateAccessCode, java.lang.Long expirationDate) throws AwUnsupportedApiVersionException, java.io.IOException, AnywhereException
authToken - authentication token for the user performing the requestpath - path (including file name) of the linkurl - url of the linkupdateAccessCode - whether or not to create a new access codeexpirationDate - expiration date of the linkAwUnsupportedApiVersionExceptionjava.io.IOExceptionAnywhereExceptionpublic Link update(AuthToken authToken, java.lang.String url, boolean updateAccessCode, java.lang.Long expirationDate) throws AwUnsupportedApiVersionException, java.io.IOException, AnywhereException
authToken - authentication token for the user performing the requesturl - url of the linkupdateAccessCode - whether or not to create a new access codeexpirationDate - expiration date of the linkAwUnsupportedApiVersionExceptionjava.io.IOExceptionAnywhereExceptionpublic LinkListing list(AuthToken authToken) throws AwUnsupportedApiVersionException, java.io.IOException, AnywhereException
authToken - AwUnsupportedApiVersionExceptionjava.io.IOExceptionAnywhereExceptionpublic LinkListing list(AuthToken authToken, java.lang.String filter, java.lang.String pageToken, java.lang.Integer pageSize, LinkListRequest.LinkSortingCriterion sortingCriterion, FolderListingRequest.SortingDirection sortingDirection) throws AwUnsupportedApiVersionException, java.io.IOException, AnywhereException
authToken - filter - A filter to apply to the results, filtering out any results that don't match
the string.pageToken - if null, the first page of entries are returned. To return the next page of
entries, use the pageToken that was returned in the previous callpageSize - The number of results to return.sortingCriterion - How the links should be ordered in the response (NAME, EXPIRATION,
PUBLIC, HAS_ACCESS_CODE, PERMISSIONS)sortingDirection - Whether the links should be ordered in ascending or descending order
(ASC, DESC).AwUnsupportedApiVersionExceptionjava.io.IOExceptionAnywhereExceptionpublic Entry getPublicLinkPathMetadata(AuthToken authToken, java.lang.String linkToken, java.lang.String itemName, java.lang.String accessCode, java.lang.String path) throws AwUnsupportedApiVersionException, java.io.IOException, AnywhereException
authToken - authentication token for the user performing the requestlinkToken - Link token of the linkitemName - The name of the folder that the link points toaccessCode - Access code of the linkpath - path of the entry relative to the linkAwUnsupportedApiVersionExceptionjava.io.IOExceptionAnywhereExceptionpublic Entry getPrivateLinkPathMetadata(AuthToken authToken, java.lang.String linkToken, java.lang.String itemName, java.lang.String accessCode, java.lang.String path) throws AwUnsupportedApiVersionException, java.io.IOException, AnywhereException
authToken - authentication token for the user performing the requestlinkToken - Link token of the linkitemName - The name of the folder that the link points toaccessCode - Access code of the linkpath - path of the entry relative to the linkAwUnsupportedApiVersionExceptionjava.io.IOExceptionAnywhereExceptionpublic LinkBrowseListing browsePublicLink(AuthToken authToken, java.lang.String linkToken, java.lang.String itemName, java.lang.String accessCode, java.lang.String path, java.lang.String pageToken, int pageSize, FolderListingRequest.SortingCriterion sortingCriterion, FolderListingRequest.SortingDirection sortingDirection) throws AwUnsupportedApiVersionException, java.io.IOException, AnywhereException
authToken - authentication token for the user performing the requestlinkToken - Link token of the linkitemName - The name of the folder/file that the link points toaccessCode - Access code of the linkpath - path of the folder/file relative to the linkpageToken - if null, the first page of entries are returned. To return the next page of
entries, use the pageToken that was returned in the previous callpageSize - maximum number of entries to be returnedsortingCriterion - How the results should be sorted (by NAME, SIZE, or MODIFY_DATE).
Defaults to NAME. Folders always appear first.sortingDirection - In which direction the results should be presented (ASC for ascending
order, DESC for descending order, based on the sorting criterion). Defaults to
ASC.AwUnsupportedApiVersionExceptionjava.io.IOExceptionAnywhereExceptionpublic LinkBrowseListing browsePrivateLink(AuthToken authToken, java.lang.String linkToken, java.lang.String itemName, java.lang.String accessCode, java.lang.String path, java.lang.String pageToken, int pageSize, FolderListingRequest.SortingCriterion sortingCriterion, FolderListingRequest.SortingDirection sortingDirection) throws AwUnsupportedApiVersionException, java.io.IOException, AnywhereException
authToken - authentication token for the user performing the requestlinkToken - Link token of the linkitemName - The name of the folder/file that the link points toaccessCode - Access code of the linkpath - path of the folder/file relative to the linkpageToken - if null, the first page of entries are returned. To return the next page of
entries, use the pageToken that was returned in the previous callpageSize - maximum number of entries to be returnedsortingCriterion - How the results should be sorted (by NAME, SIZE, or MODIFY_DATE).
Defaults to NAME. Folders always appear first.sortingDirection - In which direction the results should be presented (ASC for ascending
order, DESC for descending order, based on the sorting criterion). Defaults to
ASC.AwUnsupportedApiVersionExceptionjava.io.IOExceptionAnywhereExceptionpublic Entry readFilePublicLink(AuthToken authToken, java.lang.String linkToken, java.lang.String itemName, java.lang.String accessCode, java.lang.String path, java.lang.String etag, java.io.OutputStream out) throws AwUnsupportedApiVersionException, java.io.IOException, AnywhereException
authToken - authentication token for the user performing the requestlinkToken - Link token of the linkitemName - The name of the folder that the link points toaccessCode - Access code of the linkpath - path of the file relative to the linketag - the etag of the file. Can be nullout - OutputStream where the zip file is writtenEntry downloaded is returned. (However, calling
Entry.getParent() on the returned Entry will
return null.) If no data was downloaded (because the etag matched), then null is
returned.AwUnsupportedApiVersionExceptionjava.io.IOExceptionAnywhereExceptionpublic Entry readFilePrivateLink(AuthToken authToken, java.lang.String linkToken, java.lang.String itemName, java.lang.String accessCode, java.lang.String path, java.lang.String etag, java.io.OutputStream out) throws AwUnsupportedApiVersionException, java.io.IOException, AnywhereException
authToken - authentication token for the user performing the requestlinkToken - Link token of the linkitemName - The name of the folder that the link points toaccessCode - Access code of the linkpath - path of the file relative to the linketag - the etag of the file. Can be nullout - OutputStream where the zip file is written * @return
If data was downloaded (because etag was null or did not match), then the
Entry downloaded is returned. (However,
calling Entry.getParent() on the returned
Entry will return null.) If no data was downloaded (because the etag matched),
then null is returned.AwUnsupportedApiVersionExceptionjava.io.IOExceptionAnywhereExceptionpublic Entry createFilePublicLink(AuthToken authToken, java.lang.String linkToken, java.lang.String itemName, java.lang.String accessCode, java.lang.String path, java.lang.Long size, java.lang.String hash, java.lang.Boolean createParents, java.io.InputStream contentIn) throws AwUnsupportedApiVersionException, java.io.IOException, AnywhereException
authToken - authentication token for the user performing the requestlinkToken - Link token of the linkitemName - The name of the folder that the link points toaccessCode - Access code of the linkpath - path (including file name) where the file is uploadedsize - size (in bytes) of the file being uploaded. This argument is optionalhash - the SHA-384 hash, represented as a hex string, of the file being uploaded. This
argument is optionalcreateParents - if true, then any parent folders of path that do not already exist will
be created. if false, then the operation will fail if any parent folders of path
do not exist. This argument is optionalcontentIn - InputStream containing the new file contents.AwUnsupportedApiVersionExceptionjava.io.IOExceptionAnywhereExceptionpublic Entry createFilePrivateLink(AuthToken authToken, java.lang.String linkToken, java.lang.String itemName, java.lang.String accessCode, java.lang.String path, java.lang.Long size, java.lang.String hash, java.lang.Boolean createParents, java.io.InputStream contentIn) throws AwUnsupportedApiVersionException, java.io.IOException, AnywhereException
authToken - authentication token for the user performing the requestlinkToken - Link token of the linkitemName - The name of the folder that the link points toaccessCode - Access code of the linkpath - path (including file name) where the file is uploadedsize - size (in bytes) of the file being uploaded. This argument is optionalhash - the SHA-384 hash, represented as a hex string, of the file being uploaded. This
argument is optionalcreateParents - if true, then any parent folders of path that do not already exist will
be created. if false, then the operation will fail if any parent folders of path
do not exist. This argument is optionalcontentIn - InputStream containing the new file contents.AwUnsupportedApiVersionExceptionjava.io.IOExceptionAnywhereExceptionpublic void multiFileDownloadPublicLink(AuthToken authToken, java.util.List<java.lang.String> pathList, java.lang.String linkToken, java.lang.String itemName, java.lang.String accessCode, java.io.OutputStream out) throws AwUnsupportedApiVersionException, java.io.IOException, AnywhereException
authToken - authentication token for the user performing the requestpathList - List of path to be downloaded relative to the linklinkToken - Link token of the linkitemName - The name of the folder that the link points toaccessCode - Access code of the linkout - OutputStream where the zip file is writtenAwUnsupportedApiVersionExceptionjava.io.IOExceptionAnywhereExceptionpublic void multiFileDownloadPrivateLink(AuthToken authToken, java.util.List<java.lang.String> pathList, java.lang.String linkToken, java.lang.String itemName, java.lang.String accessCode, java.io.OutputStream out) throws AwUnsupportedApiVersionException, java.io.IOException, AnywhereException
authToken - authentication token for the user performing the requestpathList - List of path to be downloaded relative to the linklinkToken - Link token of the linkitemName - The name of the folder that the link points toaccessCode - Access code of the linkout - OutputStream where the zip file is writtenAwUnsupportedApiVersionExceptionjava.io.IOExceptionAnywhereExceptionpublic Entry updateFilePublicLink(AuthToken authToken, java.lang.String linkToken, java.lang.String itemName, java.lang.String accessCode, java.lang.String path, java.lang.Long size, java.lang.String hash, java.lang.String etag, java.io.InputStream contentIn) throws AwUnsupportedApiVersionException, java.io.IOException, AnywhereException
authToken - authentication token for the user performing the requestlinkToken - Link token of the linkitemName - The name of the folder that the link points toaccessCode - Access code of the linkpath - path (including file name) where the file is being updatedsize - size (in bytes) of the file being uploaded. This argument is optionalhash - the SHA-384 hash, represented as a hex string, of the file being uploaded. This
argument is optionaletag - the etag of the file you are updating. The operation fails if there is not a file
with this etag at the given pathcontentIn - InputStream containing the new file contentsAwUnsupportedApiVersionExceptionjava.io.IOExceptionAnywhereExceptionpublic Entry updateFilePrivateLink(AuthToken authToken, java.lang.String linkToken, java.lang.String itemName, java.lang.String accessCode, java.lang.String path, java.lang.Long size, java.lang.String hash, java.lang.String etag, java.io.InputStream contentIn) throws AwUnsupportedApiVersionException, java.io.IOException, AnywhereException
authToken - authentication token for the user performing the requestlinkToken - Link token of the linkitemName - The name of the folder that the link points toaccessCode - Access code of the linkpath - path (including file name) where the file is being updatedsize - size (in bytes) of the file being uploaded. This argument is optionalhash - the SHA-384 hash, represented as a hex string, of the file being uploaded. This
argument is optionaletag - the etag of the file you are updating. The operation fails if there is not a file
with this etag at the given pathcontentIn - InputStream containing the new file contentsAwUnsupportedApiVersionExceptionjava.io.IOExceptionAnywhereExceptionpublic void copyFilesToLocalPublicLink(AuthToken authToken, java.lang.String linkToken, java.lang.String itemName, java.lang.String accessCode, java.util.List<java.lang.String> pathList, java.lang.String destinationPath) throws AwUnsupportedApiVersionException, java.io.IOException, AnywhereException
authToken - authentication token for the user performing the requestlinkToken - Link token of the linkitemName - The name of the folder that the link points toaccessCode - Access code of the linkpathList - List of path to be copied to local relative to the linkdestinationPath - Destination path fAwUnsupportedApiVersionExceptionjava.io.IOExceptionAnywhereExceptionpublic void copyFilesToLocalPrivateLink(AuthToken authToken, java.lang.String linkToken, java.lang.String itemName, java.lang.String accessCode, java.util.List<java.lang.String> pathList, java.lang.String destinationPath) throws AwUnsupportedApiVersionException, java.io.IOException, AnywhereException
authToken - authentication token for the user performing the requestlinkToken - Link token of the linkitemName - The name of the folder that the link points toaccessCode - Access code of the linkpathList - List of path to be copied to local relative to the linkdestinationPath - Destination path fAwUnsupportedApiVersionExceptionjava.io.IOExceptionAnywhereException