getComponentSpec function
ComponentSpec
getComponentSpec(
- String pluginName,
- String componentId
)
Implementation
ComponentSpec getComponentSpec(String pluginName, String componentId) {
var plugin = Apis.apis().getRegistryApi().componentSpecMap()[pluginName];
if (plugin != null) {
for (var component in plugin) {
if (component.name == componentId) {
return component;
}
}
throw Exception(
"Plugin with name '$pluginName' does not contain component with id $componentId");
} else {
throw Exception("Plugin with name '$pluginName' does not exist");
}
}