PolicyConstants.PERM_CHANGE,
getSessionInfo(request).getUser());
URLConnection con = ExtensionStore.getInstance().downloadExtension(id, version);
try {
InputStream in = con.getInputStream();
ExtensionBundle bundle = ExtensionStore.getInstance().updateExtension(id, in, request, con.getContentLength());
if (bundle.isContainsPlugin())
GlobalWarningManager.getInstance().addMultipleGlobalWarning(new GlobalWarning(GlobalWarning.MANAGEMENT_USERS, new BundleActionMessage("extensions",
"extensionStore.message.extensionUpdatedRestartRequired"), DismissType.DISMISS_FOR_USER));
ActionMessages msgs = new ActionMessages();
msgs.add(Globals.MESSAGE_KEY, new ActionMessage("extensionStore.message.applicationUpdated", bundle.getName()));
saveMessages(request, msgs);
} catch (CoreException ce) {
ActionMessages errs = new ActionMessages();
errs.add(Globals.ERROR_KEY, ce.getBundleActionMessage());
saveErrors(request, errs);