Examples of Alerts


Examples of org.apache.helix.model.Alerts

      for (ConstraintType type : ConstraintType.values()) {
        Set<ConstraintId> constraints = Sets.newHashSet();
        _removedConstraints.put(type, constraints);
      }
      _removedStats = new PersistentStats(PersistentStats.nodeName);
      _removedAlerts = new Alerts(Alerts.nodeName);
      _builder = new Builder(clusterId);
    }
View Full Code Here

Examples of org.apache.helix.model.Alerts

          stats.getMapFields().remove(removedStat);
        }
      }

      // remove alerts
      Alerts alerts = result.getAlerts();
      for (String removedAlert : _removedAlerts.getMapFields().keySet()) {
        if (alerts.getMapFields().containsKey(removedAlert)) {
          alerts.getMapFields().remove(removedAlert);
        }
      }
      return result;
    }
View Full Code Here

Examples of org.apache.helix.model.Alerts

      _stateModelMap = new HashMap<StateModelDefId, StateModelDefinition>();
      _isPaused = false;
      _autoJoin = false;
      _userConfig = new UserConfig(Scope.cluster(id));
      _stats = new PersistentStats(PersistentStats.nodeName);
      _alerts = new Alerts(Alerts.nodeName);
    }
View Full Code Here

Examples of org.apache.helix.model.Alerts

  }

  public void persistAlerts() {
    // XXX: Am I using _accessor too directly here?

    Alerts alerts = _accessor.getProperty(_keyBuilder.alerts());
    if (alerts == null) {
      alerts = new Alerts(Alerts.nodeName); // TODO: fix naming of this record, if it matters
    }
    alerts.getRecord().setMapFields(_alertsMap);
    boolean retVal = _accessor.setProperty(_keyBuilder.alerts(), alerts);
    logger.debug("persistAlerts retVal: " + retVal);
  }
View Full Code Here

Examples of org.apache.helix.model.Alerts

    return alerts;
  }

  public void updateCache(HealthDataCache cache) {
    _cache = cache;
    Alerts alertsRecord = _cache.getAlerts();
    if (alertsRecord != null) {
      _alertsMap = alertsRecord.getMapFields();
    } else {
      _alertsMap = new HashMap<String, Map<String, String>>();
    }
  }
View Full Code Here

Examples of org.apache.openejb.webapp.common.Alerts

     * configuration, then this method will just leave the logging.properties file alone
     */
    public void installConfigFiles() {
        final File openejbCoreJar = paths.getOpenEJBCoreJar();
        final File confDir = paths.getCatalinaConfDir();
        final Alerts alerts = this.alerts;

        if (openejbCoreJar == null) {
            // the core jar contains the config files
            return;
        }
        JarFile coreJar;
        try {
            coreJar = new JarFile(openejbCoreJar);
        } catch (IOException e) {
            return;
        }

        //
        // conf/openejb.xml
        //

        File openEjbXmlFile = new File(confDir, "openejb.xml");
        if (!openEjbXmlFile.exists()) {
            // read in the openejb.xml file from the openejb core jar
            String openEjbXml = Installers.readEntry(coreJar, "default.openejb.conf", alerts);
            if (openEjbXml != null) {
                if (Installers.writeAll(openEjbXmlFile, openEjbXml, alerts)) {
                    alerts.addInfo("Copy openejb.xml to conf");
                }
            }
        }


        //
        // conf/logging.properties
        //
        String openejbLoggingProps = Installers.readEntry(coreJar, "logging.properties", alerts);
        if (openejbLoggingProps != null) {
            File loggingPropsFile = new File(confDir, "logging.properties");
            String newLoggingProps = null;
            if (!loggingPropsFile.exists()) {
                newLoggingProps = openejbLoggingProps;
            } else {
                String loggingPropsOriginal = Installers.readAll(loggingPropsFile, alerts);
                if (!loggingPropsOriginal.toLowerCase().contains("openejb")) {
                    // strip off license header
                    String[] strings = openejbLoggingProps.split("## --*", 3);
                    if (strings.length == 3) {
                        openejbLoggingProps = strings[2];
                    }
                    // append our properties
                    newLoggingProps = loggingPropsOriginal +
                            "\r\n" +
                            "############################################################\r\n" +
                            "# OpenEJB Logging Configuration.\r\n" +
                            "############################################################\r\n" +
                            openejbLoggingProps + "\r\n";
                }
            }
            if (newLoggingProps != null) {
                if (Installers.writeAll(loggingPropsFile, newLoggingProps, alerts)) {
                    alerts.addInfo("Append OpenEJB config to logging.properties");
                }
            }
        }

        //
        // conf/web.xml
        //

        JarFile openejbTomcatCommonJar;
        try {
            openejbTomcatCommonJar = new JarFile(paths.geOpenEJBTomcatCommonJar());
        } catch (IOException e) {
            return;
        }
        File webXmlFile = new File(confDir, "web.xml");
        if (webXmlFile.exists()) {
            if (!webXmlFile.delete()) {
                alerts.addError("can't replace web.xml");
            }
        }
        String webXml = Installers.readEntry(openejbTomcatCommonJar, "conf/web.xml", alerts);
        if (Installers.writeAll(webXmlFile, webXml, alerts)) {
            alerts.addInfo("Set jasper in production mode in TomEE web.xml");
        }
    }
View Full Code Here

Examples of org.apache.openejb.webapp.common.Alerts

     * configuration, then this method will just leave the logging.properties file alone
     */
    public void installConfigFiles() {
        final File openejbCoreJar = paths.getOpenEJBCoreJar();
        final File confDir = paths.getCatalinaConfDir();
        final Alerts alerts = this.alerts;

        if (openejbCoreJar == null) {
            // the core jar contains the config files
            return;
        }
        JarFile coreJar;
        try {
            coreJar = new JarFile(openejbCoreJar);
        } catch (IOException e) {
            return;
        }

        //
        // conf/openejb.xml
        //

        File openEjbXmlFile = new File(confDir, "openejb.xml");
        if (!openEjbXmlFile.exists()) {
            // read in the openejb.xml file from the openejb core jar
            String openEjbXml = Installers.readEntry(coreJar, "default.openejb.conf", alerts);
            if (openEjbXml != null) {
                if (Installers.writeAll(openEjbXmlFile, openEjbXml, alerts)) {
                    alerts.addInfo("Copy openejb.xml to conf");
                }
            }
        }


        //
        // conf/logging.properties
        //
        String openejbLoggingProps = Installers.readEntry(coreJar, "logging.properties", alerts);
        if (openejbLoggingProps != null) {
            File loggingPropsFile = new File(confDir, "logging.properties");
            String newLoggingProps = null;
            if (!loggingPropsFile.exists()) {
                newLoggingProps = openejbLoggingProps;
            } else {
                String loggingPropsOriginal = Installers.readAll(loggingPropsFile, alerts);
                if (!loggingPropsOriginal.toLowerCase().contains("openejb")) {
                    // strip off license header
                    String[] strings = openejbLoggingProps.split("## --*", 3);
                    if (strings.length == 3) {
                        openejbLoggingProps = strings[2];
                    }
                    // append our properties
                    newLoggingProps = loggingPropsOriginal +
                            "\r\n" +
                            "############################################################\r\n" +
                            "# OpenEJB Logging Configuration.\r\n" +
                            "############################################################\r\n" +
                            openejbLoggingProps + "\r\n";
                }
            }
            if (newLoggingProps != null) {
                if (Installers.writeAll(loggingPropsFile, newLoggingProps, alerts)) {
                    alerts.addInfo("Append OpenEJB config to logging.properties");
                }
            }
        }
    }
View Full Code Here

Examples of org.apache.tomee.installer.Alerts

            installer.getStatus();
            EasyMock.expectLastCall().andReturn(Status.NONE);
            installer.getStatus();
            EasyMock.expectLastCall().andReturn(Status.REBOOT_REQUIRED);
            installer.getAlerts();
            EasyMock.expectLastCall().andReturn(new Alerts()).anyTimes();


            final Runner runner = new Runner(installer);
            EasyMock.replay(paths, installer);
            Assert.assertEquals("NONE", getValue("status", runner.execute(false)));
View Full Code Here

Examples of org.eclipse.jst.jsf.common.ui.internal.guiutils.Alerts

    if (root.getFile(filePath).exists()) {
      getViewer().getControl().setFocus();
      super.drop(event);
      LocalDropEditPolicy.setCheckUpdate(true);
    } else {
      Alerts alert = PDPlugin.getAlerts();
      alert.info("LocalSelectionDropTargetListener.MessageDialog.Title", //$NON-NLS-1$
          "LocalSelectionDropTargetListener.MessageDialog.Message"); //$NON-NLS-1$
    }
  }
View Full Code Here

Examples of org.eclipse.jst.jsf.common.ui.internal.guiutils.Alerts

    try {
      // get resource bundle.
      _resourceBundle = ResourceBundle
          .getBundle(IJMTConstants.ROOT_RESOURCEBUNDLE);
      _alerts = new Alerts(this, _resourceBundle);

      // get properties.
      _properties = new Properties();
      InputStream input = null;
      _pluginBase = getBundle().getEntry("/"); //$NON-NLS-1$
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.