Class CompositeVTB

  • All Implemented Interfaces:
    ValueProvider, ValueType

    public abstract class CompositeVTB
    extends java.lang.Object
    implements ValueProvider, ValueType
    Base class for composite value types. It just gathers results of several other VTS for display in one chart.
    • Field Detail

      • myKey

        protected final java.lang.String myKey
      • myFormat

        protected final java.lang.String myFormat
    • Method Detail

      • getSubKeys

        public abstract java.lang.String[] getSubKeys()
        Return an array of the data subKeys - the keys reference ValueProvider.getKey call
        Returns:
        keys for the data
      • getSeriesName

        public abstract java.lang.String getSeriesName​(java.lang.String subKey,
                                                       int idx)
        Return series name for the data
        Parameters:
        subKey - key for the series, see getSubKeys
        idx - 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
      • updateSettingsForSubType

        protected BuildChartSettings updateSettingsForSubType​(ChartSettings chartSettings,
                                                              java.lang.String subKey,
                                                              int idx)
        Update and return BuildChartSettings object
        Parameters:
        chartSettings - chart settings object - initial chart settings, de facto instance of BuildChartSettings, but this may change in the future.
        subKey - key for the series, see getSubKeys
        idx - 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
      • getDataSet

        @NotNull
        public java.util.List<BuildValue> getDataSet​(@NotNull
                                                     ChartSettings _chartSettings)
        Description copied from interface: ValueProvider
        This should return dataset based given chartSettings
        Specified by:
        getDataSet in interface ValueProvider
        Parameters:
        _chartSettings - to be applied to dataset
        Returns:
        filtered dataset
      • getDataSet

        @NotNull
        public java.util.List<BuildValue> getDataSet​(@NotNull
                                                     ChartSettings _chartSettings,
                                                     @NotNull
                                                     java.lang.String subKey,
                                                     int index)
      • getData

        @NotNull
        public java.util.Map<java.lang.String,​BuildValue> getData​(@NotNull
                                                                        SBuild build)
      • getOrCreateValueProviderFor

        @Nullable
        protected BuildValueProvider getOrCreateValueProviderFor​(@NotNull
                                                                 java.lang.String subKey)
      • createValueProviderForSubkey

        protected BuildValueProvider createValueProviderForSubkey​(java.lang.String subKey)
      • 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
      • getKey

        public 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
      • 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 - the same filter as passed to ValueProvider.getDataSet(ChartSettings) method
        Returns:
        graph description, used in graph title on the web
      • getSeriesColor

        @Nullable
        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
      • getValueFormat

        @Nullable
        public java.lang.String getValueFormat()
        Description copied from interface: ValueType

        Format name for Values (point hints and axis).

        Following formats are supported by default:

        • text - no special formatting, value is treat as float
        • integer - only integer values
        • duration - value is treat as milliseconds and is formatted
        • size - value is treat as bytes and is formatted
        • percent - value is treat as N%
        • percentBy1 - value is treat as (N * 100)%

        Specified by:
        getValueFormat in interface ValueType
        Returns:
        format name.
      • buildTypeTitle

        protected java.lang.String buildTypeTitle​(ChartSettings currentSettings,
                                                  java.lang.String baseTitle)