Package com.sas.lsaf.content.workspace
Interface BatchWorkspaceService
-
public interface BatchWorkspaceService
A service to perform batch operations in the current user's workspace.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 aActionStatus.CompletionStatus
and message that indicates the overall status. The ActionStatus also contains a list ofActionStatusDetail
s, which provides the status of each file.- Since:
- 1.5
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
downloadAsZip(java.util.Set<java.lang.String> paths, java.lang.String localFilePath, boolean overwrite)
Takes the workspace paths in the selected set and downloads them to the specified zip file .ActionStatus
uploadAndExpand(java.lang.String parentPath, java.lang.String localFilePath, boolean createParentFolders)
Unzips the specified zip file and saves the contents to the specified workspace location.
-
-
-
Method Detail
-
uploadAndExpand
ActionStatus uploadAndExpand(java.lang.String parentPath, java.lang.String localFilePath, boolean createParentFolders)
Unzips the specified zip file and saves the contents to the specified workspace location.- Parameters:
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.- Returns:
- The summary status of the batch upload operation.
-
downloadAsZip
void downloadAsZip(java.util.Set<java.lang.String> paths, java.lang.String localFilePath, boolean overwrite) throws WorkspaceItemNotFoundException, java.io.IOException
Takes the workspace paths in the selected set and downloads them to the specified zip file . The paths can be file path or container paths. If a container path is specified, all of that container's contents included in the zip file.- Parameters:
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.- Throws:
WorkspaceItemNotFoundException
- thrown when one of the paths for download is not found.java.io.IOException
- thrown if there is a problem streaming the file contents.
-
-