com.sas.hls.resource.workspace
Interface BatchWorkspaceResourceService


public interface BatchWorkspaceResourceService

A service for performing batch operations in the workspace. The methods on this service are a best effort which means if an error occurs with one resource, it will continue on to the next.

Each method returns an ActionStatus with a ActionStatus.SummaryStatusCode and message indicating the overall status. The ActionStatus also contains a list of ActionStatusEntrys which provides the status of each file.


Method Summary
 ActionStatus downloadAsZip(Set<String> paths, String localFilePath, boolean overwrite)
          Takes the workspace paths in the selected set and downloads them to the zip file specified in local path.
 ActionStatus uploadAndExpand(String parentPath, String localFilePath, boolean createParentFolders)
          Unzips the zip file specified in localZipFilePath and saves the contents to the workspace location specified in parentPath.
 

Method Detail

uploadAndExpand

ActionStatus uploadAndExpand(String parentPath,
                             String localFilePath,
                             boolean createParentFolders)
Unzips the zip file specified in localZipFilePath and saves the contents to the workspace location specified in parentPath.

Parameters:
parentPath - The parent path of the container in which to create the expand the contents of the specified zip.
localFilePath - The local file path of the zip in which to upload and expand.
createParentFolders - Whether to create parent containers if they do not exist.
Returns:
Summary status of the batch upload operation.

downloadAsZip

ActionStatus downloadAsZip(Set<String> paths,
                           String localFilePath,
                           boolean overwrite)
Takes the workspace paths in the selected set and downloads them to the zip file specified in local path. Paths can file or container paths. If a container path is specified, all of that container's contents will be downloaded to the zip.

Parameters:
paths - List of paths to be downloaded to a zip
localFilePath - The local file path in which to save the zip.
overwrite - Whether to overwrite the local zip file if it exists.
Returns:
Summary status of the batch download operation.


Copyright (c) 2016, SAS Institute Inc., Cary, NC, USA