Package com.sas.lsaf.clinical.common
Class BatchFileCreateInfo
- java.lang.Object
-
- com.sas.lsaf.clinical.common.BatchFileCreateInfo
-
- All Implemented Interfaces:
java.io.Serializable
public class BatchFileCreateInfo extends java.lang.Object implements java.io.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
andenableVersioning
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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description BatchFileCreateInfo(java.lang.String path, SourceLocation location)
Constructor.BatchFileCreateInfo(java.lang.String parentPath, java.lang.String name, SourceLocation location)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BatchFileCreateInfo
comment(java.lang.String comment)
BatchFileCreateInfo
enableVersioning()
BatchFileCreateInfo
enableVersioning(boolean enableVersioning)
java.lang.String
getComment()
Gets the file comment to associate with the new file or new version of the file.java.lang.String
getCustomVersionForExistingFiles()
Gets the custom version number to use when updating an existing versioned file.java.lang.String
getCustomVersionForNewFiles()
Gets the custom version number to use to create a new versioned file.java.lang.String
getDescription()
Gets the description to add to the new file or new version of the file.SourceLocation
getLocation()
Gets the location of the file: the repository or the workspace.java.lang.String
getPath()
Gets the path defining where one or files will be created.VersionType
getVersionTypeForExistingFiles()
Gets the method to generate the next version for existing versioned files.VersionType
getVersionTypeForNewFiles()
Gets the method to generate the first version of created files, ifenableVersioning
is true.boolean
isEnableVersioning()
Indicates whether files that are created maintain versions.boolean
isOverwrite()
Indicates whether existing unversioned files should be overwritten.BatchFileCreateInfo
overwrite()
BatchFileCreateInfo
overwrite(boolean overwrite)
void
setComment(java.lang.String comment)
Sets the file comment to associate with the new file or new version of the file.void
setCustomVersionForExistingFiles(java.lang.String customVersionForExistingFiles)
Sets the custom version number to use to update an existing versioned file.void
setCustomVersionForNewFiles(java.lang.String customVersionForNewFiles)
Sets the custom version number to use when creating a new versioned file.void
setDescription(java.lang.String description)
Sets the description of the new file or new version of the file.void
setEnableVersioning(boolean enableVersioning)
Sets the value that indicates whether files created maintain versions.void
setOverwrite(boolean overwrite)
Sets the value that indicates whether existing unversioned files are overwritten.void
setVersionTypeForExistingFiles(VersionType versionTypeForExistingFiles)
Sets the method to generate the next version for existing versioned files.void
setVersionTypeForNewFiles(VersionType versionTypeForNewFiles)
Gets the method to generate the first version of created files, ifenableVersioning
is true.
-
-
-
Constructor Detail
-
BatchFileCreateInfo
public BatchFileCreateInfo(java.lang.String path, SourceLocation location)
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
public BatchFileCreateInfo(java.lang.String parentPath, java.lang.String name, SourceLocation location)
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 Detail
-
getComment
public java.lang.String 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
public void setComment(java.lang.String comment)
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
public java.lang.String 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
public void setDescription(java.lang.String description)
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 valuetrue
causes the new file created to maintain versions by default. The valuefalse
will 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 valuetrue
causes 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 valuefalse
indicates 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
public VersionType 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
public void setVersionTypeForExistingFiles(VersionType versionTypeForExistingFiles)
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
public VersionType getVersionTypeForNewFiles()
Gets the method to generate the first version of created files, ifenableVersioning
is true. The default isMAJOR
.- Returns:
- The method to generate the first version of created files, if
enableVersioning
is true.
-
setVersionTypeForNewFiles
public void setVersionTypeForNewFiles(VersionType versionTypeForNewFiles)
Gets the method to generate the first version of created files, ifenableVersioning
is true. The default isMAJOR
.- Parameters:
versionTypeForNewFiles
- The method to generate the first version of created files, ifenableVersioning
is true.
-
getCustomVersionForNewFiles
public java.lang.String 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 type
specified.- Returns:
- The custom version number to use to create a new versioned file.
-
setCustomVersionForNewFiles
public void setCustomVersionForNewFiles(java.lang.String customVersionForNewFiles)
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 type
specified.- Parameters:
customVersionForNewFiles
- The custom version number to use when creating a new versioned file.
-
getCustomVersionForExistingFiles
public java.lang.String 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 type
specified.- Returns:
- The custom version number to use when updating an existing versioned file.
-
setCustomVersionForExistingFiles
public void setCustomVersionForExistingFiles(java.lang.String customVersionForExistingFiles)
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 type
specified.- Parameters:
customVersionForExistingFiles
- The custom version number to use to update a versioned file.
-
getLocation
public SourceLocation getLocation()
Gets the location of the file: the repository or the workspace.- Returns:
- The location of the file: the repository or the workspace.
-
getPath
public java.lang.String 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
public BatchFileCreateInfo comment(java.lang.String comment)
-
enableVersioning
public BatchFileCreateInfo enableVersioning()
-
enableVersioning
public BatchFileCreateInfo enableVersioning(boolean enableVersioning)
-
overwrite
public BatchFileCreateInfo overwrite()
-
overwrite
public BatchFileCreateInfo overwrite(boolean overwrite)
-
-