jetbrains.buildServer.serverSide.statistics.build
Class CompositeVTB

java.lang.Object
  extended by jetbrains.buildServer.serverSide.statistics.build.StorageValueProvider
      extended by jetbrains.buildServer.serverSide.statistics.build.BuildValueTypeBase
          extended by jetbrains.buildServer.serverSide.statistics.build.BuildFinishAwareValueTypeBase
              extended by jetbrains.buildServer.serverSide.statistics.build.CompositeVTB
All Implemented Interfaces:
BuildFinishAware, ValueProvider, ValueType
Direct Known Subclasses:
DeclarativeCompositeValueType

public abstract class CompositeVTB
extends BuildFinishAwareValueTypeBase

Base class for composite value types. It just gathers results of several other VTS for display in one chart.


Field Summary
 
Fields inherited from class jetbrains.buildServer.serverSide.statistics.build.BuildValueTypeBase
myServer
 
Fields inherited from class jetbrains.buildServer.serverSide.statistics.build.StorageValueProvider
myStorage
 
Constructor Summary
protected CompositeVTB(BuildDataStorage buildDataStorage, ValueProviderRegistry valueProviderRegistry, SBuildServer server, java.lang.String key)
           
protected CompositeVTB(BuildDataStorage buildDataStorage, ValueProviderRegistry valueProviderRegistry, SBuildServer server, java.lang.String key, java.text.Format format)
           
 
Method Summary
 java.util.List<BuildValue> getDataSet(ChartSettings _chartSettings)
          use default storage, provided chartSettings and getValueProcessor() to obtain dataset
protected  ValueProvider getOrCreateValueProviderFor(java.lang.String subKey)
           
abstract  java.lang.String getSeriesName(java.lang.String subKey, int idx)
          Return series name for the data
abstract  java.lang.String[] getSubKeys()
          Return an array of the data subkeys - the keys reference ValueProvider.getKey call
 boolean hasData(ChartSettings buildChartSettings)
          Returns true if at least one not-null value is available for this ValueProvider for given settings
protected  BuildChartSettings updateSettingsForSubType(ChartSettings chartSettings, java.lang.String subKey, int idx)
          Update and return BuildChartSettings object
 
Methods inherited from class jetbrains.buildServer.serverSide.statistics.build.BuildFinishAwareValueTypeBase
buildFinished, buildTypeTitle, calculateBuildMetric, publishValue, toString
 
Methods inherited from class jetbrains.buildServer.serverSide.statistics.build.BuildValueTypeBase
getExtendedDescription, getSeriesColor, getSeriesGenericName, getValueFormat, hasAtLeastOneBuild, isAvailable
 
Methods inherited from class jetbrains.buildServer.serverSide.statistics.build.StorageValueProvider
getKey, getValueProcessor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface jetbrains.buildServer.serverSide.statistics.ValueType
getDescription
 
Methods inherited from interface jetbrains.buildServer.serverSide.statistics.ValueProvider
getKey
 

Constructor Detail

CompositeVTB

protected CompositeVTB(BuildDataStorage buildDataStorage,
                       ValueProviderRegistry valueProviderRegistry,
                       SBuildServer server,
                       java.lang.String key)

CompositeVTB

protected CompositeVTB(BuildDataStorage buildDataStorage,
                       ValueProviderRegistry valueProviderRegistry,
                       SBuildServer server,
                       java.lang.String key,
                       java.text.Format format)
Method Detail

getSubKeys

public abstract java.lang.String[] getSubKeys()
Return an array of the data subkeys - the keys reference ValueProvider.getKey call

Returns:
keys for the data

getSeriesName

public abstract java.lang.String getSeriesName(java.lang.String subKey,
                                               int idx)
Return series name for the data

Parameters:
subKey - key for the series, see getSubKeys
idx - 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,
                                                      java.lang.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 getSubKeys
idx - 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 java.util.List<BuildValue> getDataSet(@NotNull
                                                     ChartSettings _chartSettings)
Description copied from class: StorageValueProvider
use default storage, provided chartSettings and getValueProcessor() to obtain dataset

Specified by:
getDataSet in interface ValueProvider
Overrides:
getDataSet in class StorageValueProvider
Parameters:
_chartSettings - dataset chartSettings
Returns:
dataset

getOrCreateValueProviderFor

protected ValueProvider getOrCreateValueProviderFor(java.lang.String subKey)

hasData

public boolean hasData(ChartSettings buildChartSettings)
Description copied from interface: ValueProvider
Returns true if at least one not-null value is available for this ValueProvider for given settings

Specified by:
hasData in interface ValueProvider
Overrides:
hasData in class BuildValueTypeBase
Parameters:
buildChartSettings - dataset chartSettings
Returns:
true if there are some data available for this ValueProvider with given settings