jetbrains.buildServer.web.statistics.graph
Class DeclarativeValueTypeProvider

java.lang.Object
  extended by jetbrains.buildServer.web.statistics.graph.DeclarativeValueTypeProvider
All Implemented Interfaces:
XmlExternalizable, XmlStorable

public class DeclarativeValueTypeProvider
extends java.lang.Object
implements XmlStorable

This class manages xml-based graphs. It saves and loads corresponding information to a xml file in format:

<graph title="graph title" hideFilters="filters to hide" defaultFilters="">
   <valueType key="refKey1" title="SeriesDesc"/>
   <valueType key="refKey2" title="SeriesDesc" buildTypeId="buildTypeId"/>
</graph>

 

Author:
kir

Field Summary
protected  SBuildServer myServer
           
protected  BuildDataStorage myStorage
           
protected  ValueProviderRegistry myValueProviderRegistry
           
 
Constructor Summary
DeclarativeValueTypeProvider(ValueProviderRegistry valueProviderRegistry, BuildDataStorage storage, SBuildServer server)
          Construct the DeclarativeValueTypeProvider
 
Method Summary
 void addGraph(XmlGraphBean bean)
           
 void dispose()
          This method is required for implementation of ProjectSettings interface
 java.util.List<XmlGraphBean> getGraphs()
           
 java.util.List<DeclarativeCompositeValueType> getRegistered()
           
protected  void onBuildTypeExternalIdChanged(SBuildType buildType, java.lang.String oldExternalId, java.lang.String newExternalId)
           
 void readFrom(org.jdom.Element rootElement)
          Read this element data from given JDOM node
protected  DeclarativeCompositeValueType registerValueType(XmlGraphBean bean)
           
 void writeTo(org.jdom.Element parentElement)
          Write data to the JDOM element
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface jetbrains.buildServer.XmlExternalizable
writeTo
 

Field Detail

myStorage

protected final BuildDataStorage myStorage

myValueProviderRegistry

protected final ValueProviderRegistry myValueProviderRegistry

myServer

protected final SBuildServer myServer
Constructor Detail

DeclarativeValueTypeProvider

public DeclarativeValueTypeProvider(ValueProviderRegistry valueProviderRegistry,
                                    BuildDataStorage storage,
                                    SBuildServer server)
Construct the DeclarativeValueTypeProvider

Parameters:
valueProviderRegistry - registry for value types, registered by this provider
storage - build data storage
valueProviderRegistry - registry for value types, registered by this provider
Method Detail

onBuildTypeExternalIdChanged

protected void onBuildTypeExternalIdChanged(SBuildType buildType,
                                            java.lang.String oldExternalId,
                                            java.lang.String newExternalId)

getRegistered

public java.util.List<DeclarativeCompositeValueType> getRegistered()
Returns:
list of registered declarative value types

registerValueType

protected DeclarativeCompositeValueType registerValueType(XmlGraphBean bean)

readFrom

public void readFrom(org.jdom.Element rootElement)
Description copied from interface: XmlStorable
Read this element data from given JDOM node

Specified by:
readFrom in interface XmlStorable
Parameters:
rootElement - element which contains information about this storable

dispose

public void dispose()
This method is required for implementation of ProjectSettings interface


addGraph

public void addGraph(XmlGraphBean bean)

getGraphs

public java.util.List<XmlGraphBean> getGraphs()

writeTo

public void writeTo(org.jdom.Element parentElement)
Description copied from interface: XmlExternalizable
Write data to the JDOM element

Specified by:
writeTo in interface XmlExternalizable
Parameters:
parentElement - - parent element to write data to