Package com.sas.lsaf.clinical.common
Class BatchFileCreateInfo
java.lang.Object
com.sas.lsaf.clinical.common.BatchFileCreateInfo
- All Implemented Interfaces:
Serializable
This class represents all of the properties and attributes that can be set for a file when it is created.
The following table illustrates the use of the overwrite and enableVersioning flags and the effect
that they have on the outcome when there is or is not an existing file at the location specified. The red background
indicates that the flag has no effect on the combination of factors, the green means it is directly related to the
results.
| file existence | overwrite | enableVersioning | results |
|---|---|---|---|
| no file | FALSE | FALSE | New unversioned file created |
| FALSE | TRUE | New versioned file created | |
| TRUE | FALSE | New unversioned file created | |
| TRUE | TRUE | New versioned file created | |
| unversioned file exists | FALSE | FALSE | Exists exception |
| FALSE | TRUE | Exists exception | |
| TRUE | FALSE | File content updated in place | |
| TRUE | TRUE | File content updated in place | |
| versioned file exists | FALSE | FALSE | New version created |
| FALSE | TRUE | New version created | |
| TRUE | FALSE | New version created | |
| TRUE | TRUE | New version created |
- Since:
- 2.2
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionBatchFileCreateInfo(String path, SourceLocation location) Constructor.BatchFileCreateInfo(String parentPath, String name, SourceLocation location) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionenableVersioning(boolean enableVersioning) Gets the file comment to associate with the new file or new version of the file.Gets the custom version number to use when updating an existing versioned file.Gets the custom version number to use to create a new versioned file.Gets the description to add to the new file or new version of the file.Gets the location of the file: the repository or the workspace.getPath()Gets the path defining where one or files will be created.Gets the method to generate the next version for existing versioned files.Gets the method to generate the first version of created files, ifenableVersioningis true.booleanIndicates whether files that are created maintain versions.booleanIndicates whether existing unversioned files should be overwritten.overwrite(boolean overwrite) voidsetComment(String comment) Sets the file comment to associate with the new file or new version of the file.voidsetCustomVersionForExistingFiles(String customVersionForExistingFiles) Sets the custom version number to use to update an existing versioned file.voidsetCustomVersionForNewFiles(String customVersionForNewFiles) Sets the custom version number to use when creating a new versioned file.voidsetDescription(String description) Sets the description of the new file or new version of the file.voidsetEnableVersioning(boolean enableVersioning) Sets the value that indicates whether files created maintain versions.voidsetOverwrite(boolean overwrite) Sets the value that indicates whether existing unversioned files are overwritten.voidsetVersionTypeForExistingFiles(VersionType versionTypeForExistingFiles) Sets the method to generate the next version for existing versioned files.voidsetVersionTypeForNewFiles(VersionType versionTypeForNewFiles) Gets the method to generate the first version of created files, ifenableVersioningis true.
-
Constructor Details
-
BatchFileCreateInfo
Constructor.- Parameters:
path- The path in which to create the file. The path can include a prefix to a file, as can be specified withexportStandardToDataSets.location- The location of the file: the repository or the workspace.
-
BatchFileCreateInfo
Constructor.- Parameters:
parentPath- The parent path in which to create the file.name- The name of the container in which the files are created or a prefix for the files that are created.location- The location of the file: the repository or the workspace.
-
-
Method Details
-
getComment
Gets the file comment to associate with the new file or new version of the file.- Returns:
- The file comment to associate with the new file or new version of the file.
-
setComment
Sets the file comment to associate with the new file or new version of the file.- Parameters:
comment- The file comment to associate with the new file or new version of the file.
-
getDescription
Gets the description to add to the new file or new version of the file.- Returns:
- The description to add to the new file or new version of the file.
-
setDescription
Sets the description of the new file or new version of the file.- Parameters:
description- The description of the new file or new version of the file.
-
isEnableVersioning
public boolean isEnableVersioning()Indicates whether files that are created maintain versions. This setting is used only when no files exist at the location specified. If a file already exists at the specified path, the attribute has no effect.- Returns:
- Indicates whether files that are created maintain versions.
-
setEnableVersioning
public void setEnableVersioning(boolean enableVersioning) Sets the value that indicates whether files created maintain versions. This setting is used only when no file exists at the location specified. The valuetruecauses the new file created to maintain versions by default. The valuefalsewill cause the new file to be created unversioned. If a file already exists at the specified path, the attribute has no effect.- Parameters:
enableVersioning- The Boolean value that indicates whether new files created should maintain versions.
-
isOverwrite
public boolean isOverwrite()Indicates whether existing unversioned files should be overwritten. This setting is only used when an unversioned file exists at the location specified. If no file exists or a versioned file exists at the specified path, the attribute has no effect.- Returns:
- Indicates whether files that are created maintain versions.
-
setOverwrite
public void setOverwrite(boolean overwrite) Sets the value that indicates whether existing unversioned files are overwritten. This setting is used only when an unversioned file exists at the location specified. The valuetruecauses the contents of the unversioned file to be replaced with the new contents. The file is not re-created, it is the same file but with new contents. The valuefalseindicates that when a file exists in the location, an exception is thrown. If no file exists or a versioned file exists at the specified path, the attribute has no effect.- Parameters:
overwrite- Indicates whether existing unversioned files are overwritten.
-
getVersionTypeForExistingFiles
Gets the method to generate the next version for existing versioned files. The default isMINOR.- Returns:
- The method to generate the next version for existing versioned files.
-
setVersionTypeForExistingFiles
Sets the method to generate the next version for existing versioned files. The default isMINOR.- Parameters:
versionTypeForExistingFiles- The method to generate the next version for existing versioned files.
-
getVersionTypeForNewFiles
Gets the method to generate the first version of created files, ifenableVersioningis true. The default isMAJOR.- Returns:
- The method to generate the first version of created files, if
enableVersioningis true.
-
setVersionTypeForNewFiles
Gets the method to generate the first version of created files, ifenableVersioningis true. The default isMAJOR.- Parameters:
versionTypeForNewFiles- The method to generate the first version of created files, ifenableVersioningis true.
-
getCustomVersionForNewFiles
Gets the custom version number to use to create a new versioned file. If this is not specified, the revision number to use is calculated based on theversion typespecified.- Returns:
- The custom version number to use to create a new versioned file.
-
setCustomVersionForNewFiles
Sets the custom version number to use when creating a new versioned file. If this is not specified then the revision number to use will be calculated based on theversion typespecified.- Parameters:
customVersionForNewFiles- The custom version number to use when creating a new versioned file.
-
getCustomVersionForExistingFiles
Gets the custom version number to use when updating an existing versioned file. If this is not specified then then revision number to use will be calculated based on theversion typespecified.- Returns:
- The custom version number to use when updating an existing versioned file.
-
setCustomVersionForExistingFiles
Sets the custom version number to use to update an existing versioned file. If this is not specified, the revision number to use is calculated based on theversion typespecified.- Parameters:
customVersionForExistingFiles- The custom version number to use to update a versioned file.
-
getLocation
Gets the location of the file: the repository or the workspace.- Returns:
- The location of the file: the repository or the workspace.
-
getPath
Gets the path defining where one or files will be created. This could include a prefix to a file as inStandardsService.exportStandardToDataSets(String, com.sas.lsaf.core.EntityStatus, String, BatchFileCreateInfo).- Returns:
- The path defining where one or files will be created.
-
comment
-
enableVersioning
-
enableVersioning
-
overwrite
-
overwrite
-