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 StringDEFAULT_GRAPH_LIST_KEYConstantDEFAULT_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 voidafterPropertiesSet()afterPropertiesSetAdhocGraphTypefindAdhocGraphTypeByName(String name)findAdhocByNamePrefabGraphTypefindPrefabGraphTypeByName(String name)findByNameprotected Map<String,org.springframework.core.io.Resource>getAdhocConfigs()getAdhocConfigsList<PrefabGraph>getAllPrefabGraphs()getAllPrefabGraphsprotected Map<String,org.springframework.core.io.Resource>getPrefabConfigs()getPrefabConfigsPrefabGraphgetPrefabGraph(String name)getPrefabGraphPrefabGraph[]getPrefabGraphsForResource(OnmsResource resource)getPrefabGraphsForResourcevoidloadAdhocProperties(String type, InputStream in)loadAdhocPropertiesvoidloadAdhocProperties(String type, org.springframework.core.io.Resource resource)createPrefabGraphType loadAdhocPropertiesvoidloadProperties(String type, InputStream in)loadPropertiesvoidloadProperties(String typeName, org.springframework.core.io.Resource resource)loadPropertiesvoidsetAdhocConfigs(Map<String,org.springframework.core.io.Resource> adhocConfigs)setAdhocConfigsvoidsetPrefabConfigs(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:
findPrefabGraphTypeByNamein interfaceGraphDao- Parameters:
name- aStringobject.- Returns:
- a
PrefabGraphTypeobject.
-
findAdhocGraphTypeByName
public AdhocGraphType findAdhocGraphTypeByName(String name)
findAdhocByName
- Specified by:
findAdhocGraphTypeByNamein interfaceGraphDao- Parameters:
name- aStringobject.- Returns:
- a
AdhocGraphTypeobject.
-
loadProperties
public void loadProperties(String typeName, org.springframework.core.io.Resource resource) throws IOException
loadProperties
- Parameters:
typeName- aStringobject.resource- aResourceobject.- 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- aStringobject.in- aInputStreamobject.- Throws:
IOException- if any.
-
loadAdhocProperties
public void loadAdhocProperties(String type, org.springframework.core.io.Resource resource) throws IOException
createPrefabGraphType loadAdhocProperties
- Parameters:
type- aStringobject.resource- aResourceobject.- Throws:
IOException- if any.
-
loadAdhocProperties
public void loadAdhocProperties(String type, InputStream in) throws IOException
loadAdhocProperties
- Parameters:
type- aStringobject.in- aInputStreamobject.- Throws:
IOException- if any.
-
getAllPrefabGraphs
public List<PrefabGraph> getAllPrefabGraphs()
getAllPrefabGraphs
- Specified by:
getAllPrefabGraphsin interfaceGraphDao- Returns:
- a
Listobject.
-
getPrefabGraph
public PrefabGraph getPrefabGraph(String name)
getPrefabGraph
- Specified by:
getPrefabGraphin interfaceGraphDao- Parameters:
name- aStringobject.- Returns:
- a
PrefabGraphobject.
-
getPrefabGraphsForResource
public PrefabGraph[] getPrefabGraphsForResource(OnmsResource resource)
getPrefabGraphsForResource
- Specified by:
getPrefabGraphsForResourcein interfaceGraphDao- Parameters:
resource- aOnmsResourceobject.- Returns:
- an array of
PrefabGraphobjects.
-
afterPropertiesSet
public void afterPropertiesSet() throws IOExceptionafterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
IOException- if any.
-
getAdhocConfigs
protected Map<String,org.springframework.core.io.Resource> getAdhocConfigs()
getAdhocConfigs
- Returns:
- a
Mapobject.
-
setAdhocConfigs
public void setAdhocConfigs(Map<String,org.springframework.core.io.Resource> adhocConfigs)
setAdhocConfigs
- Parameters:
adhocConfigs- aMapobject.
-
getPrefabConfigs
protected Map<String,org.springframework.core.io.Resource> getPrefabConfigs()
getPrefabConfigs
- Returns:
- a
Mapobject.
-
-