boolean typesUpdated = false;
PluginMetadataManager metadataManager = getPluginMetadataManager();
if (newOrUpdated || forceUpdate || !metadataManager.getPluginNames().contains(newPluginName)) {
Set<ResourceType> rootResourceTypes = metadataManager.loadPlugin(pluginDescriptor);
if (rootResourceTypes == null) {
throw new Exception("Failed to load plugin [" + newPluginName + "].");
}
if (newOrUpdated || forceUpdate) {
// Only merge the plugin's ResourceTypes into the DB if the plugin is new or updated or we were forced to