jetbrains.buildServer.web.statistics.graph
Class DeclarativeCompositeValueType

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
                  extended by jetbrains.buildServer.web.statistics.graph.DeclarativeCompositeValueType
All Implemented Interfaces:
BuildFinishAware, ValueProvider, ValueType

public class DeclarativeCompositeValueType
extends CompositeVTB

This value type represents a composite value type which unions several values from other value types. It also provides properties for jsp which renders multi-series graphs.

See Also:
DeclarativeValueTypeProvider

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
DeclarativeCompositeValueType(BuildDataStorage storage, SBuildServer server, ValueProviderRegistry valueProviderRegistry, XmlGraphBean bean)
          Creates a declarative value type and registers it in the ValueProviderRegistry
 
Method Summary
 java.lang.String getDefaultFilter()
          Get line with filters which should be set by default
 java.lang.String getDescription(ChartSettings chartSettings)
          Metric textual description, i.e.
 java.lang.String getHideFilters()
          Get line with hidden filters
 java.lang.String getSeriesGenericName()
          Generic name for this value's series
 java.lang.String getSeriesName(java.lang.String subKey, int i)
          Return series name for the data
 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
 void setAlwaysAvailable(boolean alwaysVisible)
           
protected  BuildChartSettings updateSettingsForSubType(ChartSettings _chartSettings, java.lang.String valueTypeKey, int i)
          Update and return BuildChartSettings object
 
Methods inherited from class jetbrains.buildServer.serverSide.statistics.build.CompositeVTB
getDataSet, getOrCreateValueProviderFor
 
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, 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.ValueProvider
getKey
 

Constructor Detail

DeclarativeCompositeValueType

public DeclarativeCompositeValueType(BuildDataStorage storage,
                                     SBuildServer server,
                                     ValueProviderRegistry valueProviderRegistry,
                                     XmlGraphBean bean)
Creates a declarative value type and registers it in the ValueProviderRegistry

Parameters:
storage - data storage
server - build server object
valueProviderRegistry - registry for data providers
bean - xml-description of the graph model
Method Detail

getDescription

@NotNull
public java.lang.String getDescription(@Nullable
                                               ChartSettings chartSettings)
Description copied from interface: ValueType
Metric textual description, i.e. "Build Duration"

Parameters:
chartSettings - the same settings as passed to ValueProvider.getDataSet(ChartSettings) method
Returns:
graph description, used in graph title on the web

getSubKeys

public java.lang.String[] getSubKeys()
Description copied from class: CompositeVTB
Return an array of the data subkeys - the keys reference ValueProvider.getKey call

Specified by:
getSubKeys in class CompositeVTB
Returns:
keys for the data

updateSettingsForSubType

protected BuildChartSettings updateSettingsForSubType(ChartSettings _chartSettings,
                                                      java.lang.String valueTypeKey,
                                                      int i)
Description copied from class: CompositeVTB
Update and return BuildChartSettings object

Overrides:
updateSettingsForSubType in class CompositeVTB
Parameters:
_chartSettings - chart settings object - initial chart settings, de-facto instance of BuildChartSettings, but this may change in the future.
valueTypeKey - key for the series, see getSubKeys
i - 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

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 CompositeVTB
Parameters:
buildChartSettings - dataset chartSettings
Returns:
true if there are some data available for this ValueProvider with given settings

getSeriesName

public java.lang.String getSeriesName(java.lang.String subKey,
                                      int i)
Description copied from class: CompositeVTB
Return series name for the data

Specified by:
getSeriesName in class CompositeVTB
Parameters:
subKey - key for the series, see getSubKeys
i - 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

getSeriesGenericName

public java.lang.String getSeriesGenericName()
Description copied from interface: ValueType
Generic name for this value's series

Specified by:
getSeriesGenericName in interface ValueType
Overrides:
getSeriesGenericName in class BuildValueTypeBase
Returns:
short name string

getHideFilters

public java.lang.String getHideFilters()
Get line with hidden filters

Returns:
line with hidden filters
See Also:
XmlGraphBean.getHiddenFilters()

getDefaultFilter

public java.lang.String getDefaultFilter()
Get line with filters which should be set by default

Returns:
line with default filters
See Also:
XmlGraphBean.getDefaultFilters()

setAlwaysAvailable

public void setAlwaysAvailable(boolean alwaysVisible)