Class AssetGraphDefinitionRepositoryImpl
- java.lang.Object
-
- org.opennms.features.topology.plugins.topo.asset.AssetGraphDefinitionRepositoryImpl
-
- All Implemented Interfaces:
AssetGraphDefinitionRepository
public class AssetGraphDefinitionRepositoryImpl extends java.lang.Object implements AssetGraphDefinitionRepository
Persists Asset Graph Definitions in a local (xml) configuration file.- Author:
- mvrueden
-
-
Constructor Summary
Constructors Constructor Description AssetGraphDefinitionRepositoryImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addConfigDefinition(GeneratorConfig generatorConfig)
adds a new config definition to the repository throws an exception if a configuration with the same providerId already existsboolean
exists(java.lang.String providerId)
checks if config for providerId exists in the repository.GeneratorConfigList
getAllConfigDefinitions()
Returns a map of all asset topology definitions or empty map if no definitions existGeneratorConfig
getConfigDefinition(java.lang.String providerId)
Returns Asset topology definition for given providerIdvoid
removeConfigDefinition(java.lang.String providerId)
removes the config definition for a given providerId.
-
-
-
Method Detail
-
getConfigDefinition
public GeneratorConfig getConfigDefinition(java.lang.String providerId)
Description copied from interface:AssetGraphDefinitionRepository
Returns Asset topology definition for given providerId- Specified by:
getConfigDefinition
in interfaceAssetGraphDefinitionRepository
- Returns:
- GeneratorConfig containing Asset topology definition or null if config does not exist
-
exists
public boolean exists(java.lang.String providerId)
Description copied from interface:AssetGraphDefinitionRepository
checks if config for providerId exists in the repository.- Specified by:
exists
in interfaceAssetGraphDefinitionRepository
- Returns:
- true if config exists
-
getAllConfigDefinitions
public GeneratorConfigList getAllConfigDefinitions()
Description copied from interface:AssetGraphDefinitionRepository
Returns a map of all asset topology definitions or empty map if no definitions exist- Specified by:
getAllConfigDefinitions
in interfaceAssetGraphDefinitionRepository
- Returns:
- map of all GeneratorConfigs indexed by providerId
-
removeConfigDefinition
public void removeConfigDefinition(java.lang.String providerId)
Description copied from interface:AssetGraphDefinitionRepository
removes the config definition for a given providerId. Does nothing if this config does not exist.- Specified by:
removeConfigDefinition
in interfaceAssetGraphDefinitionRepository
-
addConfigDefinition
public void addConfigDefinition(GeneratorConfig generatorConfig)
Description copied from interface:AssetGraphDefinitionRepository
adds a new config definition to the repository throws an exception if a configuration with the same providerId already exists- Specified by:
addConfigDefinition
in interfaceAssetGraphDefinitionRepository
-
-