throws Exception {
DefaultExtensionsForm defaultExtensionsForm = (DefaultExtensionsForm) form;
ExtensionStoreDescriptor storeDescriptor = null;
PolicyUtil.checkPermissions(PolicyConstants.EXTENSIONS_RESOURCE_TYPE, new Permission[] { PolicyConstants.PERM_CHANGE },
request);
ExtensionStore extensionStore = ExtensionStore.getInstance();
ActionMessages msgs = new ActionMessages();
try {
extensionStore.resetExtensionStoreUpdate();
storeDescriptor = extensionStore.getDownloadableExtensionStoreDescriptor(true, ExtensionStore.getWorkingVersion());
msgs.add(Globals.MESSAGE_KEY, new BundleActionMessage("extensions", "extensionStore.message.refreshed"));
saveMessages(request, msgs);
} catch (Exception e) {
log.error("Failed to refresh extension store.", e);
msgs.add(Globals.ERROR_KEY, new BundleActionMessage("extensions", "extensionStore.message.failedToRefresh", e