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 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(String name)
findAdhocByNamePrefabGraphType
findPrefabGraphTypeByName(String name)
findByNameprotected Map<String,org.springframework.core.io.Resource>
getAdhocConfigs()
getAdhocConfigsList<PrefabGraph>
getAllPrefabGraphs()
getAllPrefabGraphsprotected Map<String,org.springframework.core.io.Resource>
getPrefabConfigs()
getPrefabConfigsPrefabGraph
getPrefabGraph(String name)
getPrefabGraphPrefabGraph[]
getPrefabGraphsForResource(OnmsResource resource)
getPrefabGraphsForResourcevoid
loadAdhocProperties(String type, InputStream in)
loadAdhocPropertiesvoid
loadAdhocProperties(String type, org.springframework.core.io.Resource resource)
createPrefabGraphType loadAdhocPropertiesvoid
loadProperties(String type, InputStream in)
loadPropertiesvoid
loadProperties(String typeName, org.springframework.core.io.Resource resource)
loadPropertiesvoid
setAdhocConfigs(Map<String,org.springframework.core.io.Resource> adhocConfigs)
setAdhocConfigsvoid
setPrefabConfigs(Map<String,org.springframework.core.io.Resource> prefabConfigs)
setPrefabConfigs
-
-
-
Field Detail
-
DEFAULT_GRAPH_LIST_KEY
public static final String DEFAULT_GRAPH_LIST_KEY
ConstantDEFAULT_GRAPH_LIST_KEY="reports"
- See Also:
- Constant Field Values
-
-
Method Detail
-
findPrefabGraphTypeByName
public PrefabGraphType findPrefabGraphTypeByName(String name)
findByName
- Specified by:
findPrefabGraphTypeByName
in interfaceGraphDao
- Parameters:
name
- aString
object.- Returns:
- a
PrefabGraphType
object.
-
findAdhocGraphTypeByName
public AdhocGraphType findAdhocGraphTypeByName(String name)
findAdhocByName
- Specified by:
findAdhocGraphTypeByName
in interfaceGraphDao
- Parameters:
name
- aString
object.- Returns:
- a
AdhocGraphType
object.
-
loadProperties
public void loadProperties(String typeName, org.springframework.core.io.Resource resource) throws IOException
loadProperties
- Parameters:
typeName
- aString
object.resource
- aResource
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
- aString
object.in
- aInputStream
object.- Throws:
IOException
- if any.
-
loadAdhocProperties
public void loadAdhocProperties(String type, org.springframework.core.io.Resource resource) throws IOException
createPrefabGraphType loadAdhocProperties
- Parameters:
type
- aString
object.resource
- aResource
object.- Throws:
IOException
- if any.
-
loadAdhocProperties
public void loadAdhocProperties(String type, InputStream in) throws IOException
loadAdhocProperties
- Parameters:
type
- aString
object.in
- aInputStream
object.- Throws:
IOException
- if any.
-
getAllPrefabGraphs
public List<PrefabGraph> getAllPrefabGraphs()
getAllPrefabGraphs
- Specified by:
getAllPrefabGraphs
in interfaceGraphDao
- Returns:
- a
List
object.
-
getPrefabGraph
public PrefabGraph getPrefabGraph(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 IOException
afterPropertiesSet
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Throws:
IOException
- if any.
-
getAdhocConfigs
protected 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
- aMap
object.
-
getPrefabConfigs
protected Map<String,org.springframework.core.io.Resource> getPrefabConfigs()
getPrefabConfigs
- Returns:
- a
Map
object.
-
-