Package com.adito.core

Examples of com.adito.core.GlobalWarning


    private void doShutdown(HttpServletRequest request, ShutdownForm shutdownForm, final boolean restart) {
        StoppableTimer timer = (StoppableTimer) CoreServlet.getServlet().getServletContext().getAttribute(StoppableTimer.NAME);
        ShutdownTimerTask stt = new ShutdownTimerTask(restart, Integer.parseInt(shutdownForm.getShutdownDelay()));
        timer.schedule(ShutdownTimerTask.NAME, stt, stt.getDelay());
        GlobalWarningManager.getInstance().addMultipleGlobalWarning(new GlobalWarning(GlobalWarning.ALL_USERS, new BundleActionMessage("setup",
            "shutdown.global.warning.message",
            stt.getShutDownTimeString()), DismissType.NO_DISMISS));
        request.getSession().setAttribute(Constants.RESTARTING, Boolean.valueOf(restart));
    }
View Full Code Here


                    // if the keystore is out of sync, the only option is to remove the key
                    // this can happen if the password is changed natively
                    publicKeyStore.removeKeys(user.getPrincipalName());
                    CoreUtil.removePageInterceptListener(request.getSession(), "updatePrivateKeyPassphrase");
                    BundleActionMessage message = new BundleActionMessage("security", "resetPrivateKey.required.message");
                    GlobalWarningManager.getInstance().addToSession(new GlobalWarning(request.getSession(), message));
                }
            }
            else {
                publicKeyStore.removeCachedKeys(user.getPrincipalName());
            }
View Full Code Here

        if (PolicyDatabaseFactory.getInstance().isAnyAccessRightAllowed(scheme.getUser(), true, true, false)) {
           
            if ("false".equals(Property.getProperty(new ContextKey("webServer.disableCertificateWarning")))
                            && !KeyStoreManager.getInstance(KeyStoreManager.DEFAULT_KEY_STORE).isCertificateTrusted(
                                            Property.getProperty(new ContextKey("webServer.alias")))) {
                GlobalWarningManager.getInstance().addMultipleGlobalWarning(new GlobalWarning(GlobalWarning.MANAGEMENT_USERS, new BundleActionMessage("keystore",
                    "keyStore.untrustedCertificate.warning"), DismissType.DISMISS_FOR_USER));
            }
           
        }
View Full Code Here

          buf.append(bundle.getName());
        }
      }
      if (buf.length() > 0) {
                GlobalWarningManager.getInstance().addMultipleGlobalWarning(
                    new GlobalWarning(GlobalWarning.MANAGEMENT_USERS, new BundleActionMessage("extensions",
                                    "startup.disabledExtensions", buf.toString()), DismissType.DISMISS_FOR_USER));
            }
    }

    /*
 
View Full Code Here

   */
  public void postInstallExtension(final ExtensionBundle newBundle, HttpServletRequest request) throws Exception {
    boolean containsPlugin = newBundle.isContainsPlugin();

    if (containsPlugin) {
        GlobalWarningManager.getInstance().addMultipleGlobalWarning(new GlobalWarning(GlobalWarning.MANAGEMENT_USERS, new BundleActionMessage("extensions",
            "extensionStore.message.pluginInstalledRestartRequired"), DismissType.DISMISS_FOR_USER));
      newBundle.setType(ExtensionBundle.TYPE_PENDING_INSTALLATION);
    } else {
      newBundle.start();

View Full Code Here

      ExtensionStore.getInstance().licenseCheck(bundle, request, fileUpload.getUploadedForward());
      ExtensionStore.getInstance().postInstallExtension(bundle, request);
    } else {
      bundle = ExtensionStore.getInstance().updateExtension(id, file.getInputStream(), request, file.getFileSize());
      if (bundle.isContainsPlugin())
        GlobalWarningManager.getInstance().addMultipleGlobalWarning(new GlobalWarning(GlobalWarning.MANAGEMENT_USERS, new BundleActionMessage("extensions",
                "extensionStore.message.extensionUpdatedRestartRequired"), DismissType.DISMISS_FOR_USER));
    }

    return fileUpload.getUploadedForward();
View Full Code Here

          des.getApplicationBundle().setType(ExtensionBundle.TYPE_PENDING_INSTALLATION);
          newPluginsFound = true;
        }
      }
      if (newPluginsFound) {
        GlobalWarningManager.getInstance().addMultipleGlobalWarning(new GlobalWarning(GlobalWarning.MANAGEMENT_USERS, new BundleActionMessage("extensions",
                "extensionStore.message.pluginInstalledRestartRequired"), DismissType.DISMISS_FOR_USER));
      }

      // Look for new extensions
      Map newLoadedExtensions = getLoadedExtensions();

      // Look for extension updates
      File updatedExtensionsDir = ExtensionStore.getInstance().getUpdatedExtensionsDirectory();
      boolean updatesFound = false;
      for (Iterator i = newLoadedExtensions.entrySet().iterator(); i.hasNext();) {
        Map.Entry ent = (Map.Entry) i.next();
        if (new File(updatedExtensionsDir, (String) ent.getKey()).exists()) {
          final ExtensionBundle bundle = (ExtensionBundle) ent.getValue();
          for (Iterator j = bundle.iterator(); j.hasNext();) {
            ExtensionDescriptor des = (ExtensionDescriptor) j.next();
            des.getApplicationBundle().setType(ExtensionBundle.TYPE_PENDING_UPDATE);
          }
          updatesFound = true;
        }
      }
      if (updatesFound) {
        GlobalWarningManager.getInstance().addMultipleGlobalWarning(new GlobalWarning(GlobalWarning.MANAGEMENT_USERS, new BundleActionMessage("extensions",
                "extensionStore.message.extensionUpdatedRestartRequired"), DismissType.DISMISS_FOR_USER));
      }

      // Check for new extensions
      for (Iterator i = newLoadedExtensions.entrySet().iterator(); i.hasNext();) {
        Map.Entry ent = (Map.Entry) i.next();
        if (!currentlyLoadedExtensions.containsKey(ent.getKey())) {
          final ExtensionBundle bundle = (ExtensionBundle) ent.getValue();

          // If installing, there may be a license agreement to handle
          File licenseFile = bundle.getLicenseFile();
          if (licenseFile != null && licenseFile.exists()) {
            final boolean fNewPluginsFound = newPluginsFound;
            CoreUtil.requestLicenseAgreement(request.getSession(), new LicenseAgreement(bundle.getName(),
                    licenseFile,
                    new LicenseAgreementCallback() {
                      public void licenseAccepted(HttpServletRequest request) {
                        // Dont care
                      }

                      public void licenseRejected(HttpServletRequest request) {
                        try {
                          ExtensionStore.getInstance().removeExtensionBundle(bundle);
                        } catch (Exception e) {
                        }
                        if (fNewPluginsFound) {
                          GlobalWarningManager.getInstance().removeGlobalWarning(request.getSession(),
                            "extensionStore.message.pluginInstalledRestartRequired");
                          GlobalWarningManager.getInstance().addMultipleGlobalWarning(new GlobalWarning(GlobalWarning.MANAGEMENT_USERS,
                            new BundleActionMessage("extensions",
                                    "extensionStore.message.pluginLicenseRejectedRestartRequired"), DismissType.DISMISS_FOR_USER));
                        }
                      }
View Full Code Here

        if (bundle == null) {
            throw new Exception("No application with an id of " + id);
        }
        ExtensionStore.getInstance().removeExtensionBundle(bundle);
        if (bundle.isContainsPlugin())
          GlobalWarningManager.getInstance().addMultipleGlobalWarning(new GlobalWarning(GlobalWarning.MANAGEMENT_USERS, new BundleActionMessage("extensions",
                            "extensionStore.message.pluginRemovedRestartRequired"), DismissType.DISMISS_FOR_USER));
        ActionMessages msgs = new ActionMessages();
        msgs.add(Globals.MESSAGE_KEY, new ActionMessage("extensionStore.message.applicationRemoved", bundle.getName()));
        saveMessages(request, msgs);
        return new RedirectWithMessages(mapping.findForward("refresh"), request);
View Full Code Here

        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) {
View Full Code Here

        if (!bundle.isContainsPlugin()) {
            bundle.stop();
        }
        ExtensionStore.getInstance().disableExtension(id);
        if(bundle.isContainsPlugin()) {
          GlobalWarningManager.getInstance().addMultipleGlobalWarning(new GlobalWarning(GlobalWarning.MANAGEMENT_USERS, new BundleActionMessage("extensions",
                            "extensionStore.message.stateChangeRestartRequired"), DismissType.DISMISS_FOR_USER));
        }
        ActionMessages messages = new ActionMessages();
        messages.add(Globals.MESSAGE_KEY, new ActionMessage("extensionStore.message.applicationDisable", bundle.getName()));
        saveMessages(request, messages);
View Full Code Here

TOP

Related Classes of com.adito.core.GlobalWarning

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.