Class CompositeVTB
- java.lang.Object
-
- jetbrains.buildServer.serverSide.statistics.build.CompositeVTB
-
- All Implemented Interfaces:
ValueProvider,ValueType
- Direct Known Subclasses:
DeclarativeCompositeValueType,TestCountValueType
public abstract class CompositeVTB extends Object implements ValueProvider, ValueType
Base class for composite value types. It just gathers results of several other VTS for display in one chart.
-
-
Field Summary
Fields Modifier and Type Field Description protected StringmyFormatprotected StringmyKeyprotected SBuildServermyServerprotected BuildDataStoragemyStorageprotected ValueProviderRegistrymyValueProviderRegistry
-
Constructor Summary
Constructors Modifier Constructor Description protectedCompositeVTB(BuildDataStorage buildDataStorage, ValueProviderRegistry valueProviderRegistry, SBuildServer server, String key)protectedCompositeVTB(BuildDataStorage buildDataStorage, ValueProviderRegistry valueProviderRegistry, SBuildServer server, String key, String format)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected StringbuildTypeTitle(ChartSettings currentSettings, String baseTitle)protected BuildValueProvidercreateValueProviderForSubkey(String subKey)Map<String,BuildValue>getData(SBuild build)List<BuildValue>getDataSet(ChartSettings _chartSettings)This should return dataset based given chartSettingsList<BuildValue>getDataSet(ChartSettings _chartSettings, String subKey, int index)StringgetExtendedDescription(ChartSettings chartSettings)Extended metric textual description (for tooltip), i.e.StringgetKey()Metric id i.e.protected BuildValueProvidergetOrCreateValueProviderFor(String subKey)StringgetSeriesColor(String s)Allows to provide special color coding for series.StringgetSeriesGenericName()Generic name for this value's seriesabstract StringgetSeriesName(String subKey, int idx)Return series name for the dataabstract String[]getSubKeys()Return an array of the data subKeys - the keys reference ValueProvider.getKey callStringgetValueFormat()Format name for Values (point hints and axis).booleanhasData(ChartSettings buildChartSettings)Returns true if at least one not-null value is available for this ValueProvider for given settingsprotected BuildChartSettingsupdateSettingsForSubType(ChartSettings chartSettings, String subKey, int idx)Update and return BuildChartSettings object-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jetbrains.buildServer.serverSide.statistics.ValueType
getDescription, getValueFormat
-
-
-
-
Field Detail
-
myValueProviderRegistry
protected final ValueProviderRegistry myValueProviderRegistry
-
myStorage
protected final BuildDataStorage myStorage
-
myServer
protected final SBuildServer myServer
-
myKey
protected final String myKey
-
myFormat
protected final String myFormat
-
-
Constructor Detail
-
CompositeVTB
protected CompositeVTB(BuildDataStorage buildDataStorage, ValueProviderRegistry valueProviderRegistry, SBuildServer server, String key)
-
CompositeVTB
protected CompositeVTB(BuildDataStorage buildDataStorage, ValueProviderRegistry valueProviderRegistry, SBuildServer server, String key, String format)
-
-
Method Detail
-
getSubKeys
public abstract String[] getSubKeys()
Return an array of the data subKeys - the keys reference ValueProvider.getKey call- Returns:
- keys for the data
-
getSeriesName
public abstract String getSeriesName(String subKey, int idx)
Return series name for the data- Parameters:
subKey- key for the series, see getSubKeysidx- index for the subKey, zero-based, 0..getSubKeys.length - 1- Returns:
- name of the serie to be shown on the UI in the combo box
-
updateSettingsForSubType
protected BuildChartSettings updateSettingsForSubType(ChartSettings chartSettings, String subKey, int idx)
Update and return BuildChartSettings object- Parameters:
chartSettings- chart settings object - initial chart settings, de facto instance of BuildChartSettings, but this may change in the future.subKey- key for the series, see getSubKeysidx- index for the subKey, zero-based, 0..getSubKeys.length - 1- Returns:
- name of the serie to be shown on the UI in the combo box
-
getDataSet
@NotNull public List<BuildValue> getDataSet(@NotNull ChartSettings _chartSettings)
Description copied from interface:ValueProviderThis should return dataset based given chartSettings- Specified by:
getDataSetin interfaceValueProvider- Parameters:
_chartSettings- to be applied to dataset- Returns:
- filtered dataset
-
getDataSet
@NotNull public List<BuildValue> getDataSet(@NotNull ChartSettings _chartSettings, @NotNull String subKey, int index)
-
getData
@NotNull public Map<String,BuildValue> getData(@NotNull SBuild build)
-
getOrCreateValueProviderFor
@Nullable protected BuildValueProvider getOrCreateValueProviderFor(@NotNull String subKey)
-
createValueProviderForSubkey
protected BuildValueProvider createValueProviderForSubkey(String subKey)
-
hasData
public boolean hasData(ChartSettings buildChartSettings)
Description copied from interface:ValueProviderReturns true if at least one not-null value is available for this ValueProvider for given settings- Specified by:
hasDatain interfaceValueProvider- Parameters:
buildChartSettings- dataset chartSettings- Returns:
- true if there are some data available for this ValueProvider with given settings
-
getKey
public String getKey()
Description copied from interface:ValueProviderMetric id i.e. "BuildDuration", this key should be unique- Specified by:
getKeyin interfaceValueProvider- Returns:
- Unique key name
-
getExtendedDescription
@NotNull public String getExtendedDescription(ChartSettings chartSettings)
Description copied from interface:ValueTypeExtended metric textual description (for tooltip), i.e. "Build Duration (includes stages A, B, C)"- Specified by:
getExtendedDescriptionin interfaceValueType- Parameters:
chartSettings- the same filter as passed toValueProvider.getDataSet(ChartSettings)method- Returns:
- graph description, used in graph title on the web
-
getSeriesColor
@Nullable public String getSeriesColor(String s)
Description copied from interface:ValueTypeAllows to provide special color coding for series.
Color should be formatted as web color - hex "#rrggbb" (or short hex form "#rgb") or color name.
- Specified by:
getSeriesColorin interfaceValueType- Parameters:
s- series key- Returns:
- series color, null to autogenerate by renderer
-
getSeriesGenericName
public String getSeriesGenericName()
Description copied from interface:ValueTypeGeneric name for this value's series- Specified by:
getSeriesGenericNamein interfaceValueType- Returns:
- short name string
-
getValueFormat
@Nullable public String getValueFormat()
Description copied from interface:ValueTypeFormat name for Values (point hints and axis).
Following formats are supported by default:
- text - no special formatting, value is treat as float
- integer - only integer values
- duration - value is treat as milliseconds and is formatted
- size - value is treat as bytes and is formatted
- percent - value is treat as N%
- percentBy1 - value is treat as (N * 100)%
- Specified by:
getValueFormatin interfaceValueType- Returns:
- format name.
-
buildTypeTitle
protected String buildTypeTitle(ChartSettings currentSettings, String baseTitle)
-
-