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.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(java.lang.String name)findAdhocByNamePrefabGraphTypefindPrefabGraphTypeByName(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()getPrefabConfigsPrefabGraphgetPrefabGraph(java.lang.String name)getPrefabGraphPrefabGraph[]getPrefabGraphsForResource(OnmsResource resource)getPrefabGraphsForResourcevoidloadAdhocProperties(java.lang.String type, java.io.InputStream in)loadAdhocPropertiesvoidloadAdhocProperties(java.lang.String type, org.springframework.core.io.Resource resource)createPrefabGraphType loadAdhocPropertiesvoidloadProperties(java.lang.String type, java.io.InputStream in)loadPropertiesvoidloadProperties(java.lang.String typeName, org.springframework.core.io.Resource resource)loadPropertiesvoidsetAdhocConfigs(java.util.Map<java.lang.String,org.springframework.core.io.Resource> adhocConfigs)setAdhocConfigsvoidsetPrefabConfigs(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:
findPrefabGraphTypeByNamein interfaceGraphDao- Parameters:
name- aStringobject.- Returns:
- a
PrefabGraphTypeobject.
-
findAdhocGraphTypeByName
public AdhocGraphType findAdhocGraphTypeByName(java.lang.String name)
findAdhocByName
- Specified by:
findAdhocGraphTypeByNamein interfaceGraphDao- Parameters:
name- aStringobject.- Returns:
- a
AdhocGraphTypeobject.
-
loadProperties
public void loadProperties(java.lang.String typeName, org.springframework.core.io.Resource resource) throws java.io.IOExceptionloadProperties
- Parameters:
typeName- aStringobject.resource- aResourceobject.- Throws:
java.io.IOException- if any.
-
loadProperties
public void loadProperties(java.lang.String type, java.io.InputStream in) throws java.io.IOExceptionloadProperties
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:
java.io.IOException- if any.
-
loadAdhocProperties
public void loadAdhocProperties(java.lang.String type, org.springframework.core.io.Resource resource) throws java.io.IOExceptioncreatePrefabGraphType loadAdhocProperties
- Parameters:
type- aStringobject.resource- aResourceobject.- Throws:
java.io.IOException- if any.
-
loadAdhocProperties
public void loadAdhocProperties(java.lang.String type, java.io.InputStream in) throws java.io.IOExceptionloadAdhocProperties
- Parameters:
type- aStringobject.in- aInputStreamobject.- Throws:
java.io.IOException- if any.
-
getAllPrefabGraphs
public java.util.List<PrefabGraph> getAllPrefabGraphs()
getAllPrefabGraphs
- Specified by:
getAllPrefabGraphsin interfaceGraphDao- Returns:
- a
Listobject.
-
getPrefabGraph
public PrefabGraph getPrefabGraph(java.lang.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 java.io.IOExceptionafterPropertiesSet
- Specified by:
afterPropertiesSetin 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
Mapobject.
-
setAdhocConfigs
public void setAdhocConfigs(java.util.Map<java.lang.String,org.springframework.core.io.Resource> adhocConfigs)
setAdhocConfigs
- Parameters:
adhocConfigs- aMapobject.
-
getPrefabConfigs
protected java.util.Map<java.lang.String,org.springframework.core.io.Resource> getPrefabConfigs()
getPrefabConfigs
- Returns:
- a
Mapobject.
-
setPrefabConfigs
public void setPrefabConfigs(java.util.Map<java.lang.String,org.springframework.core.io.Resource> prefabConfigs)
setPrefabConfigs
- Parameters:
prefabConfigs- aMapobject.
-
-