public String saveAndRebuild(Extension plugin, String fileName, String contents, String user)
{
String pluginKey = plugin.getKey();
String installedPluginKey = pluginSystemManager.saveAndRebuild(pluginKey, plugin.getPluginType(), fileName, contents, user);
eventPublisher.publish(new ExtensionUpdatedEvent(pluginKey)
.setUserName(user)
.setUserEmail(plugin.getAuthorEmail())
.addUpdatedFile(fileName)
.setMessage("Edit from the UI"));
return installedPluginKey;