org.opennms.netmgt.dao.support
Class PropertiesGraphDao

java.lang.Object
  extended by org.opennms.netmgt.dao.support.PropertiesGraphDao
All Implemented Interfaces:
GraphDao, org.springframework.beans.factory.InitializingBean

public class PropertiesGraphDao
extends Object
implements GraphDao, org.springframework.beans.factory.InitializingBean


Field Summary
static String DEFAULT_GRAPH_LIST_KEY
          Constant DEFAULT_GRAPH_LIST_KEY="reports"
 
Constructor Summary
PropertiesGraphDao()
           Constructor for PropertiesGraphDao.
 
Method Summary
 void afterPropertiesSet()
           afterPropertiesSet
 AdhocGraphType findAdhocGraphTypeByName(String name)
          findAdhocByName
 PrefabGraphType findPrefabGraphTypeByName(String name)
          findByName
 Map<String,org.springframework.core.io.Resource> getAdhocConfigs()
           getAdhocConfigs
 List<PrefabGraph> getAllPrefabGraphs()
           getAllPrefabGraphs
 Map<String,org.springframework.core.io.Resource> getPrefabConfigs()
           getPrefabConfigs
 PrefabGraph getPrefabGraph(String name)
          getPrefabGraph
 PrefabGraph[] getPrefabGraphsForResource(OnmsResource resource)
          getPrefabGraphsForResource
 void loadAdhocProperties(String type, InputStream in)
           loadAdhocProperties
 void loadAdhocProperties(String type, org.springframework.core.io.Resource resource)
          createPrefabGraphType loadAdhocProperties
 void loadProperties(String type, InputStream in)
           loadProperties
 void loadProperties(String typeName, org.springframework.core.io.Resource resource)
           loadProperties
 void setAdhocConfigs(Map<String,org.springframework.core.io.Resource> adhocConfigs)
           setAdhocConfigs
 void setPrefabConfigs(Map<String,org.springframework.core.io.Resource> prefabConfigs)
           setPrefabConfigs
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_GRAPH_LIST_KEY

public static final String DEFAULT_GRAPH_LIST_KEY
Constant DEFAULT_GRAPH_LIST_KEY="reports"

See Also:
Constant Field Values
Constructor Detail

PropertiesGraphDao

public PropertiesGraphDao()

Constructor for PropertiesGraphDao.

Method Detail

findPrefabGraphTypeByName

public PrefabGraphType findPrefabGraphTypeByName(String name)

findByName

Specified by:
findPrefabGraphTypeByName in interface GraphDao
Parameters:
name - a String object.
Returns:
a PrefabGraphType object.

findAdhocGraphTypeByName

public AdhocGraphType findAdhocGraphTypeByName(String name)

findAdhocByName

Specified by:
findAdhocGraphTypeByName in interface GraphDao
Parameters:
name - a String object.
Returns:
a AdhocGraphType object.

loadProperties

public void loadProperties(String typeName,
                           org.springframework.core.io.Resource resource)
                    throws IOException

loadProperties

Parameters:
type - a String object.
resource - a Resource object.
Throws:
IOException - if any.

loadProperties

public void loadProperties(String type,
                           InputStream in)
                    throws IOException

loadProperties

Used exclusively by test code. Will ignore an "include.directory" because we don't have a resource/path to do any useful "relative" pathing to. Also anything loaded in this fashion will *not* have auto reloading on changes, because there's no underlying Resource/File to check against. Like, duh!

Parameters:
type - a String object.
in - a InputStream object.
Throws:
IOException - if any.

loadAdhocProperties

public void loadAdhocProperties(String type,
                                org.springframework.core.io.Resource resource)
                         throws IOException

createPrefabGraphType loadAdhocProperties

Parameters:
type - a String object.
resource - a Resource object.
Throws:
IOException - if any.

loadAdhocProperties

public void loadAdhocProperties(String type,
                                InputStream in)
                         throws IOException

loadAdhocProperties

Parameters:
type - a String object.
in - a InputStream object.
Throws:
IOException - if any.

getAllPrefabGraphs

public List<PrefabGraph> getAllPrefabGraphs()

getAllPrefabGraphs

Specified by:
getAllPrefabGraphs in interface GraphDao
Returns:
a List object.

getPrefabGraph

public PrefabGraph getPrefabGraph(String name)

getPrefabGraph

Specified by:
getPrefabGraph in interface GraphDao
Parameters:
name - a String object.
Returns:
a PrefabGraph object.

getPrefabGraphsForResource

public PrefabGraph[] getPrefabGraphsForResource(OnmsResource resource)

getPrefabGraphsForResource

Specified by:
getPrefabGraphsForResource in interface GraphDao
Parameters:
resource - a OnmsResource object.
Returns:
an array of PrefabGraph objects.

afterPropertiesSet

public void afterPropertiesSet()
                        throws IOException

afterPropertiesSet

Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Throws:
IOException - if any.

getAdhocConfigs

public Map<String,org.springframework.core.io.Resource> getAdhocConfigs()

getAdhocConfigs

Returns:
a Map object.

setAdhocConfigs

public void setAdhocConfigs(Map<String,org.springframework.core.io.Resource> adhocConfigs)

setAdhocConfigs

Parameters:
adhocConfigs - a Map object.

getPrefabConfigs

public Map<String,org.springframework.core.io.Resource> getPrefabConfigs()

getPrefabConfigs

Returns:
a Map object.

setPrefabConfigs

public void setPrefabConfigs(Map<String,org.springframework.core.io.Resource> prefabConfigs)

setPrefabConfigs

Parameters:
prefabConfigs - a Map object.


Copyright © 2011. All Rights Reserved.