public interface BatchWorkspaceService
The methods in this service are a best effort that means when an error occurs with one resource, the method continues to the next resource.
Each method returns an ActionStatus
with a
ActionStatus.CompletionStatus
and message that indicates the overall status. The ActionStatus
also contains a list of ActionStatusDetail
s, which provides the status of each file.
Modifier and Type | Method and Description |
---|---|
void |
downloadAsZip(Set<String> paths,
String localFilePath,
boolean overwrite)
Takes the workspace paths in the selected set and downloads them to the specified zip file .
|
ActionStatus |
uploadAndExpand(String parentPath,
String localFilePath,
boolean createParentFolders)
Unzips the specified zip file and saves the contents to the specified workspace location.
|
ActionStatus uploadAndExpand(String parentPath, String localFilePath, boolean createParentFolders)
parentPath
- The parent path of the container in which to create and expand the contents of the specified
zip.localFilePath
- The local file path of the zip file in which to upload and expand.createParentFolders
- whether to create parent containers, if they do not exist.void downloadAsZip(Set<String> paths, String localFilePath, boolean overwrite) throws WorkspaceItemNotFoundException, IOException
paths
- the list of paths to download to the zip file.localFilePath
- the local file path in which to save the zip file.overwrite
- indicates whether to overwrite the local zip file, if it exists.WorkspaceItemNotFoundException
- thrown when one of the paths for download is not found.IOException
- thrown if there is a problem streaming the file contents.<i>Copyright (c) 2020, SAS Institute Inc., Cary, NC, USA</i>