Make generic Filter category to group all filters
@@ -77,6 +77,7 @@ PLUGIN_HANDLE FilterPipeline::loadFilterPlugin(const string& filterName)
*/
bool FilterPipeline::loadFilters(const string& categoryName)
{
+ vector<string> children; // The Child categories of 'Filters'
try
{
// Get the category with values and defaults
@@ -184,6 +185,7 @@ bool FilterPipeline::loadFilters(const string& categoryName)
Logger::getLogger()->fatal(errMsg.c_str());
throw runtime_error(errMsg);
}
+ children.push_back(categoryName);
// Instantiate the FilterPlugin class
// in order to call plugin entry points
@@ -195,6 +197,14 @@ bool FilterPipeline::loadFilters(const string& categoryName)
}
}
}
+ /*
+ * Put all the new catregories in the Filter category parent
+ * Create an empty South category if one doesn't exist
+ */
+ DefaultConfigCategory filterConfig(string("Filter"), string("{}"));
+ filterConfig.setDescription("Filters");
+ mgtClient->addCategory(filterConfig, true);
+ mgtClient->addChildCategories("Filter", children);
return true;
}
catch (ConfigItemNotFound* e)
