jetbrains.buildServer.serverSide.statistics.build
Class BuildFinishAwareValueTypeBase

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
All Implemented Interfaces:
BuildFinishAware, BuildValueProvider, ValueProvider, ValueType
Direct Known Subclasses:
CompositeVTB

public abstract class BuildFinishAwareValueTypeBase
extends BuildValueTypeBase
implements BuildFinishAware

Base class for Build values types


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 BuildFinishAwareValueTypeBase(BuildDataStorage storage, ValueProviderRegistry valueProviderRegistry, SBuildServer server, java.lang.String key)
           
protected BuildFinishAwareValueTypeBase(BuildDataStorage storage, ValueProviderRegistry valueProviderRegistry, SBuildServer server, java.lang.String key, java.lang.String format)
           
 
Method Summary
 void buildFinished(SBuild build)
          Template method: calculateBuildMetric then publishValue if not null
protected  java.lang.String buildTypeTitle(ChartSettings currentSettings, java.lang.String baseTitle)
          This is helper method to be used in getDescription call.
protected  java.math.BigDecimal calculateBuildMetric(SBuild build)
          Calculate your metric for build here
protected  void publishValue(SBuild build, java.math.BigDecimal value)
          Save calculated value using default storage.
 java.lang.String toString()
           
 
Methods inherited from class jetbrains.buildServer.serverSide.statistics.build.BuildValueTypeBase
getData, getExtendedDescription, getSeriesColor, getSeriesGenericName, getValueFormat, hasAtLeastOneBuild, hasData, isAvailable
 
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, wait, wait, wait
 
Methods inherited from interface jetbrains.buildServer.serverSide.statistics.ValueType
getDescription
 
Methods inherited from interface jetbrains.buildServer.serverSide.statistics.ValueProvider
getDataSet, getKey
 

Constructor Detail

BuildFinishAwareValueTypeBase

protected BuildFinishAwareValueTypeBase(BuildDataStorage storage,
                                        ValueProviderRegistry valueProviderRegistry,
                                        SBuildServer server,
                                        java.lang.String key)

BuildFinishAwareValueTypeBase

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

buildFinished

public void buildFinished(SBuild build)
Template method: calculateBuildMetric then publishValue if not null

Specified by:
buildFinished in interface BuildFinishAware
Parameters:
build - build to process

publishValue

protected void publishValue(SBuild build,
                            java.math.BigDecimal value)
Save calculated value using default storage.

Parameters:
build - to save value for
value - to save

calculateBuildMetric

@Nullable
protected java.math.BigDecimal calculateBuildMetric(SBuild build)
Calculate your metric for build here

Parameters:
build - build to process
Returns:
null if nothing to publish

buildTypeTitle

protected java.lang.String buildTypeTitle(ChartSettings currentSettings,
                                          java.lang.String baseTitle)
This is helper method to be used in getDescription call. Creates chart title by appending to baseTitle name of the current build type

Parameters:
currentSettings - chart settings, same which are passed to getDescription call
baseTitle - original title of the graph
Returns:
chart title

toString

@NonNls
public java.lang.String toString()
Overrides:
toString in class java.lang.Object