public static Properties getPluginProperties(String plugin) {
ArgsHolder.PluginParam pluginParam = ArgsHolder.getPluginParams().get(plugin);
Properties properties = new Properties();
File pluginDir = pluginParam != null && pluginParam.getPath() != null
? new File(pluginParam.getPath()) : new File(Directories.PLUGINS_DIR, plugin);
File confDir = new File(pluginDir, "conf");
File file = new File(confDir, PROPERTIES_FILE);
if (!file.exists()) {
log.warn("Could not find a plugin descriptor : " + file);
return properties;
}
try {
loadProperties(properties, file);
} catch (IOException e) {
log.error(String.format("Exception while loading plugin specific properties file %s.", PROPERTIES_FILE), e);
}
return properties;
}