Package com.sas.lsaf.content.repository
Interface BatchRepositoryService
public interface BatchRepositoryService
The service to perform batch operations in the repository.
The methods in this service are a best effort, which means that if an error occurs with one resource, the error continues on to the next resource.
Each method returns an ActionStatus with a
ActionStatus.CompletionStatus and message that indicates the overall completion
status. The ActionStatus also contains a list of ActionStatusDetails, which
indicates the status of each file.
-
Method Summary
Modifier and TypeMethodDescriptioncheckin(List<String> paths, RepositoryCheckinSpecification checkinSpecification) Checks in all of the files that are specified in the list of paths (which can contain container paths and file paths) that are ready for check in.Checks out all of the files that are specified in the list of paths (which can contain container paths and file paths).voiddownloadAsZip(Set<String> paths, String localFilePath, boolean overwrite) Downloads the files from a specified set of paths to a the zip file.uploadAndExpand(String parentPath, String localZipFilePath, boolean enableVersioningOnAllNewFiles, RepositoryCheckinSpecification checkinSpecification, boolean createParentFolders) Unzips the zip file that is specified in localZipFilePath and saves the contents to the repository location that is specified in parentPath.
-
Method Details
-
checkout
Checks out all of the files that are specified in the list of paths (which can contain container paths and file paths). If container paths are specified, the method recursively checks out all of the files that are below the specified location.- Parameters:
paths- The list of paths.- Returns:
- The status of the batch checkout operation, which includes the status of each file that was acted upon.
-
checkin
Checks in all of the files that are specified in the list of paths (which can contain container paths and file paths) that are ready for check in. If container paths are specified, the method recursively checks out all of the files below the listed paths. If a file is marked for addition in the current user's workspace, it is checked in.If
nullis specified for checkin, it is interpreted as a blank comment and theMINORversion update value, if the file is versioned.- Parameters:
paths- The list of paths.checkinSpecification- The method to check in files. If null is specified and the files are versioned, the version defaults to a MAJOR version.- Returns:
- The status of the batch checkin operation, which includes the status of each file that was acted upon.
-
uploadAndExpand
ActionStatus uploadAndExpand(String parentPath, String localZipFilePath, boolean enableVersioningOnAllNewFiles, RepositoryCheckinSpecification checkinSpecification, boolean createParentFolders) throws IOException Unzips the zip file that is specified in localZipFilePath and saves the contents to the repository location that is specified in parentPath. If files with the same name exist in the repository, and they are versioned, a new version is created. If a file exists, but is not versioned, it is overwritten.If
nullis specified for checkin, it is interpreted as a blank comment and theMAJORversion update value, if the file is versioned.- Parameters:
parentPath- The parent path to the container in which to create and expand the contents of the specified zip file.localZipFilePath- The local file path to the zip file to upload and expand.enableVersioningOnAllNewFiles- Indicates whether to enable versioning for new files.checkinSpecification- The method to check in files. Applies to existing versioned files and new files, if enableVersioningOnAllNewFiles is true.createParentFolders- Indicates whether to create parent containers, if they do not exist.- Returns:
- The summary status of the batch upload operation.
- Throws:
IOException
-
downloadAsZip
void downloadAsZip(Set<String> paths, String localFilePath, boolean overwrite) throws RepositoryItemNotFoundException, IOException Downloads the files from a specified set of paths to a the zip file. The paths can be file paths or container paths. If a container path is specified, all of the container's contents are downloaded to the zip file.- Parameters:
paths- The list of paths to download.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:
RepositoryItemNotFoundExceptionIOException
-