public class Configuration extends Object
| Constructor and Description |
|---|
Configuration(File reportDirectory,
String projectName) |
| Modifier and Type | Method and Description |
|---|---|
void |
addClassificationFiles(List<String> classificationFiles)
Adds properties files which house classifications in key value pairings.
|
void |
addClassifications(String name,
String value)
Adds metadata that will be displayed at the main page of the report.
|
void |
addPresentationModes(PresentationMode presentationMode)
Sets how the report should be presented.
|
void |
addReducingMethod(ReducingMethod reducingMethod)
Sets how the report should be reduced, merged or modified.
|
boolean |
containsPresentationMode(PresentationMode presentationMode)
Checks if the configuration has given
PresentationMode set. |
boolean |
containsQualifier(@NonNull String jsonFileName)
Checks whether an explicit qualifier was specified for a given json file.
|
boolean |
containsReducingMethod(ReducingMethod reducingMethod)
Checks if the configuration has given
ReducingMethod set. |
String |
getBuildNumber()
Gets the build number for this report.
|
List<String> |
getClassificationFiles()
Returns the list of properties files.
|
List<Map.Entry<String,String>> |
getClassifications()
Returns the classification for the report.
|
String |
getDirectorySuffix()
Returns directory suffix
|
String |
getDirectorySuffixWithSeparator()
Returns directory suffix with separator prepended if necessary
|
File |
getEmbeddingDirectory()
Gets directory where the attachments are stored.
|
Set<Status> |
getNotFailingStatuses()
Gets statuses which do not fail scenario.
|
String |
getProjectName()
Returns the project name.
|
String |
getQualifier(@NonNull String jsonFileName)
Retrieves explicit qualifier to use for a given json file.
|
List<ReducingMethod> |
getReducingMethods()
Gets how the report should be reduced, merged or modified.
|
File |
getReportDirectory()
Returns directory where the report should be stored.
|
SortingMethod |
getSortingMethod()
Returns the default sorting method.
|
Collection<Pattern> |
getTagsToExcludeFromChart() |
int |
getTrendsLimit()
Returns number of historical reports presented by trends.
|
File |
getTrendsStatsFile()
Returns file with history with trends.
|
boolean |
isTrendsAvailable()
Checks if the trends page should be generated and displayed.
|
boolean |
isTrendsStatsFile()
Checks if the file for the trends was set.
|
void |
removeQualifier(@NonNull String jsonFileName)
Removes explicit qualifier for a given json file.
|
void |
setBuildNumber(String buildNumber)
Sets number of the build.
|
void |
setDirectorySuffix(String directorySuffix)
Sets directory suffix.
|
void |
setNotFailingStatuses(Set<Status> notFailingStatuses)
|
void |
setQualifier(@NonNull String jsonFileName,
@NonNull String qualifier)
Sets explicit qualifier to use for the given json file.
|
void |
setSortingMethod(SortingMethod sortingMethod)
Configure how items will be sorted in the report by default.
|
void |
setTagsToExcludeFromChart(String... patterns)
Stores the regex patterns to be used for filtering out tags from the 'Tags Overview' chart
|
void |
setTrends(File trendsFile,
int limit)
Sets configuration limit for trends.
|
void |
setTrendsStatsFile(File trendsFile)
Calls
setTrends(File, int) with zero limit. |
public File getReportDirectory()
public File getTrendsStatsFile()
public boolean isTrendsStatsFile()
true if the file location was provided, otherwise falsepublic void setTrendsStatsFile(File trendsFile)
setTrends(File, int) with zero limit.trendsFile - file with trendspublic int getTrendsLimit()
public boolean isTrendsAvailable()
true if the page with trends should be displayedpublic void setTrends(File trendsFile, int limit)
trendsFile - file where information about previous builds is storedlimit - number of builds that should be presented (older builds are skipped)public String getBuildNumber()
public void setBuildNumber(String buildNumber)
buildNumber - number of the buildpublic String getProjectName()
public void setDirectorySuffix(String directorySuffix)
directorySuffix - directory suffixpublic String getDirectorySuffix()
public String getDirectorySuffixWithSeparator()
public File getEmbeddingDirectory()
public Collection<Pattern> getTagsToExcludeFromChart()
public void setTagsToExcludeFromChart(String... patterns)
patterns - Regex patterns to match against tagsValidationException - when any of the given strings is not a valid regex pattern.public void addClassifications(String name, String value)
name - name of the propertyvalue - value of the propertypublic List<Map.Entry<String,String>> getClassifications()
public void setSortingMethod(SortingMethod sortingMethod)
sortingMethod - how the items should be sortedpublic SortingMethod getSortingMethod()
public void addReducingMethod(ReducingMethod reducingMethod)
reducingMethod - type of reductionpublic List<ReducingMethod> getReducingMethods()
public boolean containsReducingMethod(ReducingMethod reducingMethod)
ReducingMethod set.reducingMethod - method to validatetrue if method was set, otherwise falsepublic void addPresentationModes(PresentationMode presentationMode)
presentationMode - method used for presentationpublic boolean containsPresentationMode(PresentationMode presentationMode)
PresentationMode set.presentationMode - method used for presentationtrue if mode was set, otherwise falsepublic void addClassificationFiles(List<String> classificationFiles)
public List<String> getClassificationFiles()
public Set<Status> getNotFailingStatuses()
public void setQualifier(@NonNull String jsonFileName, @NonNull String qualifier)
jsonFileName - JSON file name - without the extensionqualifier - Qualifier to usepublic String getQualifier(@NonNull String jsonFileName)
jsonFileName - JSON file name - without the extensionnull if none specifiedpublic boolean containsQualifier(@NonNull String jsonFileName)
jsonFileName - JSON file name - without the extensiontrue if the qualifier was specified, false otherwisepublic void removeQualifier(@NonNull String jsonFileName)
jsonFileName - JSON file name - without the extensionCopyright © 2020. All rights reserved.