Class DXProject.ArchiveRequestBuilder
- java.lang.Object
-
- com.dnanexus.DXProject.ArchiveRequestBuilder
-
-
Constructor Summary
Constructors Constructor Description ArchiveRequestBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DXProject.ArchiveRequestBuilderaddFile(DXFile file)Adds the file to the list of files for archival.DXProject.ArchiveRequestBuilderaddFiles(DXFile... files)Adds the files to the list of files for archival.DXProject.ArchiveRequestBuilderaddFiles(Collection<DXFile> files)Adds the files to the list of files for archival.DXProject.ArchiveResultsexecute()Executes the request.DXProject.ArchiveRequestBuildersetAllCopies(Boolean allCopies)Sets flag to enforce the transition of files intoArchivalState.ARCHIVEDstate.DXProject.ArchiveRequestBuildersetFolder(String folder)Sets folder for archival.DXProject.ArchiveRequestBuildersetFolder(String folder, Boolean recurse)Sets folder for archival.
-
-
-
Method Detail
-
addFile
public DXProject.ArchiveRequestBuilder addFile(DXFile file)
Adds the file to the list of files for archival.This method may be called multiple times during the construction of a request, and is mutually exclusive with
setFolder(String)andsetFolder(String, Boolean).- Parameters:
file-DXFileinstance to be archived- Returns:
- the same builder object
-
addFiles
public DXProject.ArchiveRequestBuilder addFiles(DXFile... files)
Adds the files to the list of files for archival.This method may be called multiple times during the construction of a request, and is mutually exclusive with
setFolder(String)andsetFolder(String, Boolean).- Parameters:
files- list ofDXFileinstances to be archived- Returns:
- the same builder object
-
addFiles
public DXProject.ArchiveRequestBuilder addFiles(Collection<DXFile> files)
Adds the files to the list of files for archival.This method may be called multiple times during the construction of a request, and is mutually exclusive with
setFolder(String)andsetFolder(String, Boolean).- Parameters:
files- collection ofDXFileinstances to be archived- Returns:
- the same builder object
-
setFolder
public DXProject.ArchiveRequestBuilder setFolder(String folder)
Sets folder for archival.This method may only be called once during the construction of a request, and is mutually exclusive with
addFile(DXFile),addFiles(DXFile...), andaddFiles(Collection).- Parameters:
folder- path to folder to be archived- Returns:
- the same builder object
-
setFolder
public DXProject.ArchiveRequestBuilder setFolder(String folder, Boolean recurse)
Sets folder for archival.This method may only be called once during the construction of a request, and is mutually exclusive with
addFile(DXFile),addFiles(DXFile...), andaddFiles(Collection).- Parameters:
folder- path to folder to be archivedrecurse- whether to archive all files in subfolders offolder- Returns:
- the same builder object
-
setAllCopies
public DXProject.ArchiveRequestBuilder setAllCopies(Boolean allCopies)
Sets flag to enforce the transition of files intoArchivalState.ARCHIVEDstate. If true, archive all the copies of files in projects with the samebillToorg. If false, archive only the copy of the file in the current project, while other copies of the file in the rest projects with the samebillToorg will stay in the live state.- Parameters:
allCopies- whether to enforce archival of all copies of files within the samebillToorg- Returns:
- the same builder object
-
execute
public DXProject.ArchiveResults execute()
Executes the request.- Returns:
- execution results
-
-