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 |
addReducingMethod(ReducingMethod reducingMethod)
Sets how the report should or reduced, merged or modified.
|
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.
|
File |
getEmbeddingDirectory()
Gets directory where the attachments are stored.
|
String |
getProjectName()
Returns the project name.
|
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 |
isRunWithJenkins()
Validates if the configuration is prepared to be run on Jenkins.
|
boolean |
isTrendsAvailable()
Checks if the trends page should be generated and displayed.
|
boolean |
isTrendsStatsFile()
Checks if the file for the trends was set.
|
void |
setBuildNumber(String buildNumber)
Sets number of the build.
|
void |
setRunWithJenkins(boolean runWithJenkins)
Desides if the configuration is prepared to be run on Jenkins.
|
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 for trends.
|
void |
setTrendsStatsFile(File trendsFile)
Calls
setTrends(File, int) with zero limit. |
public boolean isRunWithJenkins()
true if running on Jenkins, false otherwisepublic void setRunWithJenkins(boolean runWithJenkins)
runWithJenkins - true if running on Jenkins, false otherwisepublic 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)
setRunWithJenkins(boolean) executed on Jenkins}, this should be
integer value so the number of previous build can be calculated properly.buildNumber - number of the buildpublic String getProjectName()
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 addClassificationFiles(List<String> classificationFiles)
Copyright © 2018. All rights reserved.