Package org.opennms.web.svclayer.support
Class DefaultRrdGraphService
- java.lang.Object
-
- org.opennms.web.svclayer.support.DefaultRrdGraphService
-
- All Implemented Interfaces:
RrdGraphService
,org.springframework.beans.factory.InitializingBean
public class DefaultRrdGraphService extends java.lang.Object implements RrdGraphService, org.springframework.beans.factory.InitializingBean
DefaultRrdGraphService class.
- Author:
- DJ Gregor, Craig Miskell
-
-
Constructor Summary
Constructors Constructor Description DefaultRrdGraphService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterPropertiesSet()
afterPropertiesSetprotected java.lang.String
createAdHocCommand(AdhocGraphType adhocType, OnmsResource resource, long start, long end, java.lang.String graphtitle, java.lang.String[] dsNames, java.lang.String[] dsAggregFxns, java.lang.String[] colors, java.lang.String[] dsTitles, java.lang.String[] dsStyles)
createAdHocCommandprotected java.lang.String
createPrefabCommand(Graph graph, java.lang.String commandPrefix, java.lang.String reportName, java.lang.Integer width, java.lang.Integer height)
createPrefabCommandjava.io.InputStream
getAdhocGraph(ResourceId resourceId, java.lang.String title, java.lang.String[] dataSources, java.lang.String[] aggregateFunctions, java.lang.String[] colors, java.lang.String[] dataSourceTitles, java.lang.String[] styles, long start, long end)
GraphDao
getGraphDao()
getGraphDaojava.io.InputStream
getPrefabGraph(ResourceId resourceId, java.lang.String report, long start, long end, java.lang.Integer width, java.lang.Integer height)
ResourceDao
getResourceDao()
getResourceDaoRrdDao
getRrdDao()
getRrdDaojava.io.InputStream
returnErrorImage(java.lang.String file)
returnErrorImagevoid
setGraphDao(GraphDao graphDao)
setGraphDaovoid
setResourceDao(ResourceDao resourceDao)
setResourceDaovoid
setRrdDao(RrdDao rrdDao)
setRrdDao
-
-
-
Method Detail
-
getAdhocGraph
public java.io.InputStream getAdhocGraph(ResourceId resourceId, java.lang.String title, java.lang.String[] dataSources, java.lang.String[] aggregateFunctions, java.lang.String[] colors, java.lang.String[] dataSourceTitles, java.lang.String[] styles, long start, long end)
- Specified by:
getAdhocGraph
in interfaceRrdGraphService
-
returnErrorImage
public java.io.InputStream returnErrorImage(java.lang.String file)
returnErrorImage
- Parameters:
file
- aString
object.- Returns:
- a
InputStream
object.
-
getPrefabGraph
public java.io.InputStream getPrefabGraph(ResourceId resourceId, java.lang.String report, long start, long end, java.lang.Integer width, java.lang.Integer height)
- Specified by:
getPrefabGraph
in interfaceRrdGraphService
-
createAdHocCommand
protected java.lang.String createAdHocCommand(AdhocGraphType adhocType, OnmsResource resource, long start, long end, java.lang.String graphtitle, java.lang.String[] dsNames, java.lang.String[] dsAggregFxns, java.lang.String[] colors, java.lang.String[] dsTitles, java.lang.String[] dsStyles)
createAdHocCommand
- Parameters:
adhocType
- aAdhocGraphType
object.resource
- aOnmsResource
object.start
- a long.end
- a long.graphtitle
- aString
object.dsNames
- an array ofString
objects.dsAggregFxns
- an array ofString
objects.colors
- an array ofString
objects.dsTitles
- an array ofString
objects.dsStyles
- an array ofString
objects.- Returns:
- a
String
object.
-
createPrefabCommand
protected java.lang.String createPrefabCommand(Graph graph, java.lang.String commandPrefix, java.lang.String reportName, java.lang.Integer width, java.lang.Integer height)
createPrefabCommand
- Parameters:
graph
- aGraph
object.commandPrefix
- aString
object.workDir
- aFile
object.reportName
- aString
object.- Returns:
- a
String
object.
-
afterPropertiesSet
public void afterPropertiesSet()
afterPropertiesSet
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
-
getResourceDao
public ResourceDao getResourceDao()
getResourceDao
- Returns:
- a
ResourceDao
object.
-
setResourceDao
public void setResourceDao(ResourceDao resourceDao)
setResourceDao
- Parameters:
resourceDao
- aResourceDao
object.
-
setGraphDao
public void setGraphDao(GraphDao graphDao)
setGraphDao
- Parameters:
graphDao
- aGraphDao
object.
-
-