public interface BatchRepositoryService
The methods on 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 ActionStatusDetail
s, which provides the
status of each file.
Modifier and Type | Method and Description |
---|---|
ActionStatus |
checkin(List<String> paths,
RepositoryCheckinSpecification checkinSpecification)
Checks in all files that are specified in the list of paths (which can contain container paths and file paths) that are ready for
check in.
|
ActionStatus |
checkout(List<String> paths)
Checks out all files that are specified in the list of paths (which can contain container paths and file paths).
|
void |
downloadAsZip(Set<String> paths,
String localFilePath,
boolean overwrite)
Uses the repository paths in the selected set and downloads them to the zip file that is specified in local path.
|
ActionStatus |
uploadAndExpand(String parentPath,
String localZipFilePath,
boolean enableVersioningOnAllNewFiles,
RepositoryCheckinSpecification checkinSpecification,
boolean createParentFolders)
Unzips the zip file specified in localZipFilePath and saves the contents to the repository location that is specified in
parentPath.
|
ActionStatus checkout(List<String> paths)
paths
- list of paths to check out.ActionStatus checkin(List<String> paths, RepositoryCheckinSpecification checkinSpecification)
If null
is specified for checkin specification, that is interpreted as a blank comment and the
MINOR
version update value, if the file is versioned.
paths
- list of paths to check in.checkinSpecification
- the specification of how the files are checked in. If null is provided and the
files are versioned, the version defaults to a MAJOR version.ActionStatus uploadAndExpand(String parentPath, String localZipFilePath, boolean enableVersioningOnAllNewFiles, RepositoryCheckinSpecification checkinSpecification, boolean createParentFolders) throws IOException
If null
is specified for the checkin specification, that is interpreted as a blank comment and the
MAJOR
version update value, if the file is versioned.
parentPath
- the parent path of the container in which to create and expand the contents of the specified
zip file.localZipFilePath
- the local file path of the zip file to upload and expand.enableVersioningOnAllNewFiles
- enable versioning for new files.checkinSpecification
- how the files are checked in. Applies to existing
versioned files and new files, if enableVersioningOnAllNewFiles is true.createParentFolders
- create parent containers, if they do not exist.IOException
void downloadAsZip(Set<String> paths, String localFilePath, boolean overwrite) throws RepositoryItemNotFoundException, IOException
paths
- list of paths to download to the zip file.localFilePath
- local file path in which to save the zip file.overwrite
- overwrite the local zip file, if it exists.RepositoryItemNotFoundException
IOException
Copyright (c) 2019, SAS Institute Inc., Cary, NC, USA