Package org.opennms.netmgt.dao.support
Class PropertiesGraphDao
- java.lang.Object
-
- org.opennms.netmgt.dao.support.PropertiesGraphDao
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DEFAULT_GRAPH_LIST_KEY
ConstantDEFAULT_GRAPH_LIST_KEY="reports"
-
Constructor Summary
Constructors Constructor Description PropertiesGraphDao()
Constructor for PropertiesGraphDao.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterPropertiesSet()
afterPropertiesSetAdhocGraphType
findAdhocGraphTypeByName(java.lang.String name)
findAdhocByNamePrefabGraphType
findPrefabGraphTypeByName(java.lang.String name)
findByNameprotected java.util.Map<java.lang.String,org.springframework.core.io.Resource>
getAdhocConfigs()
getAdhocConfigsjava.util.List<PrefabGraph>
getAllPrefabGraphs()
getAllPrefabGraphsprotected java.util.Map<java.lang.String,org.springframework.core.io.Resource>
getPrefabConfigs()
getPrefabConfigsPrefabGraph
getPrefabGraph(java.lang.String name)
getPrefabGraphPrefabGraph[]
getPrefabGraphsForResource(OnmsResource resource)
getPrefabGraphsForResourcevoid
loadAdhocProperties(java.lang.String type, java.io.InputStream in)
loadAdhocPropertiesvoid
loadAdhocProperties(java.lang.String type, org.springframework.core.io.Resource resource)
createPrefabGraphType loadAdhocPropertiesvoid
loadProperties(java.lang.String type, java.io.InputStream in)
loadPropertiesvoid
loadProperties(java.lang.String typeName, org.springframework.core.io.Resource resource)
loadPropertiesvoid
setAdhocConfigs(java.util.Map<java.lang.String,org.springframework.core.io.Resource> adhocConfigs)
setAdhocConfigsvoid
setPrefabConfigs(java.util.Map<java.lang.String,org.springframework.core.io.Resource> prefabConfigs)
setPrefabConfigs
-
-
-
Field Detail
-
DEFAULT_GRAPH_LIST_KEY
public static final java.lang.String DEFAULT_GRAPH_LIST_KEY
ConstantDEFAULT_GRAPH_LIST_KEY="reports"
- See Also:
- Constant Field Values
-
-
Method Detail
-
findPrefabGraphTypeByName
public PrefabGraphType findPrefabGraphTypeByName(java.lang.String name)
findByName
- Specified by:
findPrefabGraphTypeByName
in interfaceGraphDao
- Parameters:
name
- aString
object.- Returns:
- a
PrefabGraphType
object.
-
findAdhocGraphTypeByName
public AdhocGraphType findAdhocGraphTypeByName(java.lang.String name)
findAdhocByName
- Specified by:
findAdhocGraphTypeByName
in interfaceGraphDao
- Parameters:
name
- aString
object.- Returns:
- a
AdhocGraphType
object.
-
loadProperties
public void loadProperties(java.lang.String typeName, org.springframework.core.io.Resource resource) throws java.io.IOException
loadProperties
- Parameters:
typeName
- aString
object.resource
- aResource
object.- Throws:
java.io.IOException
- if any.
-
loadProperties
public void loadProperties(java.lang.String type, java.io.InputStream in) throws java.io.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
- aString
object.in
- aInputStream
object.- Throws:
java.io.IOException
- if any.
-
loadAdhocProperties
public void loadAdhocProperties(java.lang.String type, org.springframework.core.io.Resource resource) throws java.io.IOException
createPrefabGraphType loadAdhocProperties
- Parameters:
type
- aString
object.resource
- aResource
object.- Throws:
java.io.IOException
- if any.
-
loadAdhocProperties
public void loadAdhocProperties(java.lang.String type, java.io.InputStream in) throws java.io.IOException
loadAdhocProperties
- Parameters:
type
- aString
object.in
- aInputStream
object.- Throws:
java.io.IOException
- if any.
-
getAllPrefabGraphs
public java.util.List<PrefabGraph> getAllPrefabGraphs()
getAllPrefabGraphs
- Specified by:
getAllPrefabGraphs
in interfaceGraphDao
- Returns:
- a
List
object.
-
getPrefabGraph
public PrefabGraph getPrefabGraph(java.lang.String name)
getPrefabGraph
- Specified by:
getPrefabGraph
in interfaceGraphDao
- Parameters:
name
- aString
object.- Returns:
- a
PrefabGraph
object.
-
getPrefabGraphsForResource
public PrefabGraph[] getPrefabGraphsForResource(OnmsResource resource)
getPrefabGraphsForResource
- Specified by:
getPrefabGraphsForResource
in interfaceGraphDao
- Parameters:
resource
- aOnmsResource
object.- Returns:
- an array of
PrefabGraph
objects.
-
afterPropertiesSet
public void afterPropertiesSet() throws java.io.IOException
afterPropertiesSet
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Throws:
java.io.IOException
- if any.
-
getAdhocConfigs
protected java.util.Map<java.lang.String,org.springframework.core.io.Resource> getAdhocConfigs()
getAdhocConfigs
- Returns:
- a
Map
object.
-
setAdhocConfigs
public void setAdhocConfigs(java.util.Map<java.lang.String,org.springframework.core.io.Resource> adhocConfigs)
setAdhocConfigs
- Parameters:
adhocConfigs
- aMap
object.
-
getPrefabConfigs
protected java.util.Map<java.lang.String,org.springframework.core.io.Resource> getPrefabConfigs()
getPrefabConfigs
- Returns:
- a
Map
object.
-
setPrefabConfigs
public void setPrefabConfigs(java.util.Map<java.lang.String,org.springframework.core.io.Resource> prefabConfigs)
setPrefabConfigs
- Parameters:
prefabConfigs
- aMap
object.
-
-