Class TabularRequirementsImportSettings
- java.lang.Object
-
- com.piketec.tpt.api.requirements.RequirementsImportSettings
-
- com.piketec.tpt.api.requirements.tabular.TabularRequirementsImportSettings
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
CsvFileRequirementsImportSettings
,ExcelFileRequirementsImportSettings
public abstract class TabularRequirementsImportSettings extends RequirementsImportSettings
The common settings for the requirements import from a CSV or an Excel file.
For the requirements import from a CSV file useCsvFileRequirementsImportSettings
.
For the requirements import from an Excel file useExcelFileRequirementsImportSettings
.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TabularRequirementsImportSettings()
The contructor for the common settings of the requirements import from a CSV or an Excel file.
For the requirements import from a CSV file useCsvFileRequirementsImportSettings
.
For the requirements import from an Excel file useExcelFileRequirementsImportSettings
.
The path to the source file for the import must be set viasetImportFilePath(String)
.TabularRequirementsImportSettings(java.lang.String importFilePath)
The contructor for the common settings of the requirements import from a CSV or an Excel file.
For the requirements import from a CSV file useCsvFileRequirementsImportSettings
.
For the requirements import from an Excel file useExcelFileRequirementsImportSettings
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.lang.String>
getAttributeColumns()
java.lang.String
getDocumentVersionColumn()
java.lang.String
getIdColumn()
java.lang.String
getImportFilePath()
java.lang.String
getLevelColumn()
java.lang.String
getLinksColumn()
java.lang.String
getManualDocumentVersion()
java.lang.String
getTestCaseIdAttribute()
java.util.List<java.lang.String>
getTextColumns()
java.util.List<Pair<java.lang.String,Requirement.RequirementType>>
getTypeAssignments()
java.lang.String
getTypeColumn()
java.lang.String
getUriColumn()
boolean
isShouldImportAttachments()
boolean
isWithHeaderLine()
void
setAttributeColumns(java.util.List<java.lang.String> attributeColumns)
void
setDocumentVersionColumn(java.lang.String documentVersionColumn)
void
setIdColumn(java.lang.String idColumn)
void
setImportFilePath(java.lang.String importFilePath)
void
setLevelColumn(java.lang.String levelColumn)
void
setLinksColumn(java.lang.String linksColumn)
void
setManualDocumentVersion(java.lang.String manualDocumentVersion)
void
setShouldImportAttachments(boolean shouldImportAttachments)
void
setTestCaseIdAttribute(java.lang.String testCaseIdAttribute)
void
setTextColumns(java.util.List<java.lang.String> textColumns)
void
setTypeAssignments(java.util.List<Pair<java.lang.String,Requirement.RequirementType>> typeAssignments)
void
setTypeColumn(java.lang.String typeColumn)
void
setUriColumn(java.lang.String uriColumn)
void
setWithHeaderLine(boolean withHeaderLine)
-
Methods inherited from class com.piketec.tpt.api.requirements.RequirementsImportSettings
getAutoReviewColumns, getDocument, setAutoReviewColumns, setDocument
-
-
-
-
Constructor Detail
-
TabularRequirementsImportSettings
public TabularRequirementsImportSettings(java.lang.String importFilePath)
The contructor for the common settings of the requirements import from a CSV or an Excel file.
For the requirements import from a CSV file useCsvFileRequirementsImportSettings
.
For the requirements import from an Excel file useExcelFileRequirementsImportSettings
.- Parameters:
importFilePath
- The path of the source file for the import.
-
TabularRequirementsImportSettings
public TabularRequirementsImportSettings()
The contructor for the common settings of the requirements import from a CSV or an Excel file.
For the requirements import from a CSV file useCsvFileRequirementsImportSettings
.
For the requirements import from an Excel file useExcelFileRequirementsImportSettings
.
The path to the source file for the import must be set viasetImportFilePath(String)
.
-
-
Method Detail
-
getImportFilePath
public java.lang.String getImportFilePath()
- Returns:
- The path of the source file for the import.
-
setImportFilePath
public void setImportFilePath(java.lang.String importFilePath)
- Parameters:
importFilePath
- The path of the source file for the import.
-
isShouldImportAttachments
public boolean isShouldImportAttachments()
- Returns:
- Whether the import should attach files to the imported requirements by embedding their contents in the project.
-
setShouldImportAttachments
public void setShouldImportAttachments(boolean shouldImportAttachments)
- Parameters:
shouldImportAttachments
- Set totrue
if the import should attach files to the imported requirements by embedding their contents in the project.
-
isWithHeaderLine
public boolean isWithHeaderLine()
- Returns:
- Whether the first line is a header.
-
setWithHeaderLine
public void setWithHeaderLine(boolean withHeaderLine)
- Parameters:
withHeaderLine
- Whether the first line is a header.
-
getIdColumn
public java.lang.String getIdColumn()
- Returns:
- The name of the column in the source file which contains the requirement ID.
-
setIdColumn
public void setIdColumn(java.lang.String idColumn)
- Parameters:
idColumn
- The name of the column in the source file which contains the requirement ID. Must not benull
.
-
getTextColumns
public java.util.List<java.lang.String> getTextColumns()
- Returns:
- The column names in the source file which contain requirement texts. TPT shows requirement texts in the requirements table and in report tables.
-
setTextColumns
public void setTextColumns(java.util.List<java.lang.String> textColumns)
- Parameters:
textColumns
- The column names in the source file which contain requirement texts. TPT shows requirement texts in the requirements table and in report tables.
-
getUriColumn
public java.lang.String getUriColumn()
- Returns:
- Optional name of the column in the source file which contains the requirement URI. The imported URIs will be used to create hyperlinks, e.g., to the requirements origin. These hyperlinks can then be found in the requirements table and in report tables.
-
setUriColumn
public void setUriColumn(java.lang.String uriColumn)
- Parameters:
uriColumn
- Optional name of the column in the source file which contains the requirement URI. The imported URIs will be used to create hyperlinks, e.g., to the requirements origin. These hyperlinks can then be found in the requirements table and in report tables.
-
getTypeColumn
public java.lang.String getTypeColumn()
- Returns:
- Optional name of the column in the source file which contains type information. If no type column is chosen, all objects will be imported as requirement.
-
setTypeColumn
public void setTypeColumn(java.lang.String typeColumn)
- Parameters:
typeColumn
- Optional name of the column in the source file which contains type information. If no type column is chosen, all objects will be imported as requirement.
-
getTypeAssignments
public java.util.List<Pair<java.lang.String,Requirement.RequirementType>> getTypeAssignments()
- Returns:
- Only relevant if a type column is given via
setTypeColumn(String)
. The list are the assignments of the cell values in the type column to the requirement types.
-
setTypeAssignments
public void setTypeAssignments(java.util.List<Pair<java.lang.String,Requirement.RequirementType>> typeAssignments)
- Parameters:
typeAssignments
- Only relevant if a type column is given viasetTypeColumn(String)
. The list are the assignments of the cell values in the type column to the requirement types.
-
getDocumentVersionColumn
public java.lang.String getDocumentVersionColumn()
- Returns:
- The name of the column in the source file which contains the document version. Only
relevant if no manual document version is given. If not
null
, the version within the cell in this column will be used for the document. - See Also:
setManualDocumentVersion(String)
-
setDocumentVersionColumn
public void setDocumentVersionColumn(java.lang.String documentVersionColumn)
- Parameters:
documentVersionColumn
- The name of the column in the source file which contains the document version. Only relevant if no manual document version is given. If notnull
, the version within the cell in this column will be used for the document.- See Also:
setManualDocumentVersion(String)
-
getManualDocumentVersion
public java.lang.String getManualDocumentVersion()
- Returns:
- The given version that is used for the document.
-
setManualDocumentVersion
public void setManualDocumentVersion(java.lang.String manualDocumentVersion)
- Parameters:
manualDocumentVersion
- If notnull
, this version will be used for the document.
-
getLevelColumn
public java.lang.String getLevelColumn()
- Returns:
- Optional name of the column in the source file which contains the indentation level. The requirement texts in the requirements table can be indented for a more organized view. Nonnegative integer values in the chosen column are taken as an amount of indentation. Note that changes regarding indentation levels are automatically reviewed and do not cause requirements to be marked for review.
-
setLevelColumn
public void setLevelColumn(java.lang.String levelColumn)
- Parameters:
levelColumn
- Optional name of the column in the source file which contains the indentation level. The requirement texts in the requirements table can be indented for a more organized view. Nonnegative integer values in the chosen column are taken as an amount of indentation. Note that changes regarding indentation levels are automatically reviewed and do not cause requirements to be marked for review.
-
getLinksColumn
public java.lang.String getLinksColumn()
- Returns:
- Optional name of the column in the source file which contains the test case IDs to
update the links to requirements. If
null
, links are not imported.
-
setLinksColumn
public void setLinksColumn(java.lang.String linksColumn)
- Parameters:
linksColumn
- Optional name of the column in the source file which contains the test case IDs to update the links to requirements. Ifnull
, links are not imported.
-
getTestCaseIdAttribute
public java.lang.String getTestCaseIdAttribute()
- Returns:
- The name of the TPT test case attribute that contains the IDs to find the linked test
cases. If
null
, the ID of the test case is used instead. Only relevant if a name of a links column is given such that links are imported. - See Also:
setLinksColumn(String)
-
setTestCaseIdAttribute
public void setTestCaseIdAttribute(java.lang.String testCaseIdAttribute)
- Parameters:
testCaseIdAttribute
- The name of the TPT test case attribute that contains the IDs to find the linked test cases. Ifnull
, the ID of the test case is used instead. Only relevant if a name of a links column is given such that links are imported.- See Also:
setLinksColumn(String)
-
getAttributeColumns
public java.util.List<java.lang.String> getAttributeColumns()
- Returns:
- Optional list of column names in the source file to import them as additional
requirements attributes. To enable the automatic review of possible changes of an
requirement attribute add the column name also to the
list of autoreview attributes
. - See Also:
RequirementsImportSettings.setAutoReviewColumns(List)
-
setAttributeColumns
public void setAttributeColumns(java.util.List<java.lang.String> attributeColumns)
- Parameters:
attributeColumns
- Optional list of column names in the source file to import them as additional requirements attributes. To enable the automatic review of possible changes of an requirement attribute add the column name also to thelist of autoreview attributes
.- See Also:
RequirementsImportSettings.setAutoReviewColumns(List)
-
-