Class 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
    • 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