jetbrains.buildServer.web.statistics.graph
Class XmlGraphBean

java.lang.Object
  extended by jetbrains.buildServer.web.statistics.graph.XmlGraphBean

public class XmlGraphBean
extends java.lang.Object

Xml-based descriptor for a custom graph. Some details for the descriptor can be obtained from http://www.jetbrains.net/confluence/display/TCD8/Custom+Chart

Author:
kir

Nested Class Summary
static class XmlGraphBean.ValueTypeBean
           
 
Constructor Summary
XmlGraphBean(java.lang.String title, java.lang.String defaultFilters, java.lang.String hiddenFilters)
           
XmlGraphBean(java.lang.String title, java.lang.String defaultFilters, java.lang.String hiddenFilters, java.lang.String format)
           
XmlGraphBean(java.lang.String title, java.lang.String defaultFilters, java.lang.String hiddenFilters, java.lang.String format, java.util.Map<java.lang.String,java.lang.String> properties)
           
 
Method Summary
 XmlGraphBean.ValueTypeBean addValueType()
          Adds nested value type bean, which describes another named series of data on the graph
 XmlGraphBean.ValueTypeBean addValueType(java.lang.String key, java.lang.String description, java.lang.String buildTypeId)
          Adds nested value type bean, which describes another named series of data on the graph
 XmlGraphBean.ValueTypeBean addValueType(java.lang.String key, java.lang.String description, java.lang.String buildTypeId, java.lang.String color)
          Adds nested value type bean, which describes another named series of data on the graph
 java.lang.String getDefaultFilters()
           
 java.lang.String getFormat()
           
 java.lang.String getGraphId()
           
 java.lang.String getHiddenFilters()
           
 java.util.Map<java.lang.String,java.lang.String> getProperties()
           
 java.lang.String getSerieTitle()
           
 java.lang.String getTitle()
           
 java.util.List<XmlGraphBean.ValueTypeBean> getValueTypes()
           
 void setDefaultFilters(java.lang.String defaultFilters)
          Set list of default filters (which checkboxes should be checked by default)
 void setHiddenFilters(java.lang.String hiddenFilters)
          Set list of filters which should not be visible
 void setProperties(java.util.Map<java.lang.String,java.lang.String> properties)
           
 void setSerieTitle(java.lang.String serieTitle)
          Set title for series filter
 void setTitle(java.lang.String title)
          Set graph title
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlGraphBean

public XmlGraphBean(java.lang.String title,
                    java.lang.String defaultFilters,
                    java.lang.String hiddenFilters)
Parameters:
title - title of the graph
defaultFilters - comma-separated list of filters (possible values are 'averaged', 'showFailed')
hiddenFilters - comma-separated list of filters (possible values are 'all', 'averaged', 'showFailed', 'range', 'series' )

XmlGraphBean

public XmlGraphBean(java.lang.String title,
                    java.lang.String defaultFilters,
                    java.lang.String hiddenFilters,
                    java.lang.String format)

XmlGraphBean

public XmlGraphBean(java.lang.String title,
                    java.lang.String defaultFilters,
                    java.lang.String hiddenFilters,
                    java.lang.String format,
                    java.util.Map<java.lang.String,java.lang.String> properties)
Method Detail

getFormat

public java.lang.String getFormat()

getGraphId

public java.lang.String getGraphId()
Returns:
unique graph identifier

getTitle

@NotNull
public java.lang.String getTitle()
Returns:
graph title

setTitle

public void setTitle(java.lang.String title)
Set graph title

Parameters:
title - graph title

setSerieTitle

public void setSerieTitle(java.lang.String serieTitle)
Set title for series filter

Parameters:
serieTitle - series filter title

getSerieTitle

public java.lang.String getSerieTitle()
Returns:
series filter title

getDefaultFilters

@NotNull
public java.lang.String getDefaultFilters()
Returns:
list of default filters (which checkboxes should be checked by default)

setDefaultFilters

public void setDefaultFilters(java.lang.String defaultFilters)
Set list of default filters (which checkboxes should be checked by default)

Parameters:
defaultFilters - comma-separated list of filters (possible values are 'averaged', 'showFailed')

getHiddenFilters

@NotNull
public java.lang.String getHiddenFilters()
Returns:
list of hidden filters

setHiddenFilters

public void setHiddenFilters(java.lang.String hiddenFilters)
Set list of filters which should not be visible

Parameters:
hiddenFilters - comma-separated list of filters (possible values are 'all', 'averaged', 'showFailed', 'range', 'series' )

getProperties

public java.util.Map<java.lang.String,java.lang.String> getProperties()

setProperties

public void setProperties(java.util.Map<java.lang.String,java.lang.String> properties)

getValueTypes

public java.util.List<XmlGraphBean.ValueTypeBean> getValueTypes()
Returns:
list of configured data series for the graph (list of value type descriptors)

addValueType

public XmlGraphBean.ValueTypeBean addValueType()
Adds nested value type bean, which describes another named series of data on the graph

Returns:
added bean

addValueType

public XmlGraphBean.ValueTypeBean addValueType(java.lang.String key,
                                               java.lang.String description,
                                               @Nullable
                                               java.lang.String buildTypeId)
Adds nested value type bean, which describes another named series of data on the graph

Parameters:
key - key for the value type
description - series name
buildTypeId - build configuration id this value provider should be bound to
Returns:
added bean
See Also:
ValueProvider.getKey()

addValueType

public XmlGraphBean.ValueTypeBean addValueType(java.lang.String key,
                                               java.lang.String description,
                                               @Nullable
                                               java.lang.String buildTypeId,
                                               @Nullable
                                               java.lang.String color)
Adds nested value type bean, which describes another named series of data on the graph

Parameters:
key - key for the value type
description - series name
buildTypeId - build configuration id this value provider should be bound to
color - custom series color
Returns:
added bean
See Also:
ValueProvider.getKey()