jetbrains.buildServer.serverSide.statistics.build
Class StorageValueProvider

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

public class StorageValueProvider
extends java.lang.Object
implements ValueProvider

Basic value provider which provides values from the storage (BuildDataStorage)

Author:
kir

Field Summary
protected  BuildDataStorage myStorage
           
 
Constructor Summary
StorageValueProvider(BuildDataStorage storage, java.lang.String key)
           
 
Method Summary
 java.util.List<BuildValue> getDataSet(ChartSettings chartSettings)
          use default storage, provided chartSettings and getValueProcessor() to obtain dataset
 java.lang.String getKey()
          Metric id i.e.
protected  BuildValueTransformer getValueProcessor()
          Override this to transform values upon graph dataset creation
 boolean hasData(ChartSettings buildChartSettings)
          Returns true if at least one not-null value is available for this ValueProvider for given settings
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

myStorage

protected final BuildDataStorage myStorage
Constructor Detail

StorageValueProvider

public StorageValueProvider(BuildDataStorage storage,
                            java.lang.String key)
Method Detail

getKey

public final java.lang.String getKey()
Description copied from interface: ValueProvider
Metric id i.e. "BuildDuration", this key should be unique

Specified by:
getKey in interface ValueProvider
Returns:
Unique key name

getDataSet

@NotNull
public java.util.List<BuildValue> getDataSet(@NotNull
                                                     ChartSettings chartSettings)
use default storage, provided chartSettings and getValueProcessor() to obtain dataset

Specified by:
getDataSet in interface ValueProvider
Parameters:
chartSettings - dataset chartSettings
Returns:
dataset

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

getValueProcessor

@Nullable
protected BuildValueTransformer getValueProcessor()
Override this to transform values upon graph dataset creation

Returns:
BuildValueTransformer instance