jetbrains.buildServer.serverSide.statistics.build
Class BuildValueTypeBase

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

public abstract class BuildValueTypeBase
extends StorageValueProvider
implements BuildValueProvider, ValueType

Base type for BuildValueTypes uses template


Field Summary
protected  SBuildServer myServer
           
 
Fields inherited from class jetbrains.buildServer.serverSide.statistics.build.StorageValueProvider
myStorage
 
Constructor Summary
BuildValueTypeBase(SBuildServer server, BuildDataStorage storage, ValueProviderRegistry valueProviderRegistry, java.lang.String key)
           
BuildValueTypeBase(SBuildServer server, BuildDataStorage storage, ValueProviderRegistry valueProviderRegistry, java.lang.String key, java.lang.String format)
           
 
Method Summary
 java.util.Map<java.lang.String,BuildValue> getData(SBuild build)
           
 java.lang.String getExtendedDescription(ChartSettings chartSettings)
          Extended metric textual description (for tooltip), i.e.
 java.lang.String getSeriesColor(java.lang.String s)
           Allows to provide special color coding for series.
 java.lang.String getSeriesGenericName()
          Generic name for this value's series
 java.lang.String getValueFormat()
          Returns value format
protected  boolean hasAtLeastOneBuild(java.lang.String externalBuildTypeId)
           
 boolean hasData(ChartSettings buildChartSettings)
          Returns true if at least one not-null value is available for this ValueProvider for given settings
protected  boolean isAvailable(java.lang.String buildTypeExternalId)
           
 
Methods inherited from class jetbrains.buildServer.serverSide.statistics.build.StorageValueProvider
getDataSet, getKey, getValueProcessor
 
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
 
Methods inherited from interface jetbrains.buildServer.serverSide.statistics.ValueProvider
getDataSet, getKey
 

Field Detail

myServer

protected final SBuildServer myServer
Constructor Detail

BuildValueTypeBase

public BuildValueTypeBase(SBuildServer server,
                          BuildDataStorage storage,
                          ValueProviderRegistry valueProviderRegistry,
                          java.lang.String key)

BuildValueTypeBase

public BuildValueTypeBase(SBuildServer server,
                          BuildDataStorage storage,
                          ValueProviderRegistry valueProviderRegistry,
                          java.lang.String key,
                          java.lang.String format)
Method Detail

isAvailable

protected boolean isAvailable(java.lang.String buildTypeExternalId)

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

getValueFormat

@Nullable
public java.lang.String getValueFormat()
Returns value format

Specified by:
getValueFormat in interface ValueType
Returns:
see above

getExtendedDescription

@NotNull
public java.lang.String getExtendedDescription(ChartSettings chartSettings)
Description copied from interface: ValueType
Extended metric textual description (for tooltip), i.e. "Build Duration (includes stages A, B, C)"

Specified by:
getExtendedDescription in interface ValueType
Parameters:
chartSettings - current filter may be useful to generate string
Returns:
getDescription(chartSettings) by default

getSeriesColor

public java.lang.String getSeriesColor(java.lang.String s)
Description copied from interface: ValueType

Allows 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:
getSeriesColor in interface ValueType
Parameters:
s - series key
Returns:
series color, null to autogenerate by renderer

getSeriesGenericName

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

Specified by:
getSeriesGenericName in interface ValueType
Returns:
short name string

getData

@NotNull
public java.util.Map<java.lang.String,BuildValue> getData(@NotNull
                                                                  SBuild build)
Specified by:
getData in interface BuildValueProvider
Parameters:
build - build to return statistics value for
Returns:
map of build values provided by this value provider for a given build (each value provider can report more than one statistics value, see CompositeVTB).

hasAtLeastOneBuild

protected final boolean hasAtLeastOneBuild(java.lang.String externalBuildTypeId)