Examples of Alert


Examples of net.stinfoservices.pacifiq.server.model.Alert

    @Override
    @Transactional(readOnly = false)
    public List<Long> saveAlertList(List<AlertDTO> dtos) throws Exception {
        List<Long> insertIDs = new ArrayList<Long>();
        for (AlertDTO dto : dtos) {
            Alert a = alertDAO.find(dto.getId());
            if (a == null) {
                a = new Alert();
                a.setVersion(1);
            }
            applyDiffAlert(a, dto);
            a = alertDAO.save(a);
            insertIDs.add(a.getId());
        }
        return insertIDs;
    }
View Full Code Here

Examples of nl.topicus.onderwijs.dashboard.datatypes.Alert

      Build curBuild = builds.get(curJob.getName());
      if (curBuild == null)
        continue;

      if (Result.UNSTABLE.equals(curBuild.getResult())) {
        Alert alert = new Alert(alertsCache.get(curJob.getName()),
            DotColor.YELLOW, project, "Build "
                + curBuild.getNumber() + " is unstable");
        alert.setOverlayVisible((System.currentTimeMillis() - curBuild
            .getTimestamp().getTime()) < 90 * 1000);
        alertsCache.put(curJob.getName(), alert);
        ret.add(alert);
      } else if (Result.FAILURE.equals(curBuild.getResult())) {
        Alert alert = new Alert(alertsCache.get(curJob.getName()),
            DotColor.RED, project, "Build " + curBuild.getNumber()
                + " failed");
        alert.setOverlayVisible((System.currentTimeMillis() - curBuild
            .getTimestamp().getTime()) < 90 * 1000);
        alertsCache.put(curJob.getName(), alert);
        ret.add(alert);
      } else
        alertsCache.remove(curJob.getName());
View Full Code Here

Examples of org.apache.ambari.server.state.Alert

              }
             
              if (null != status.getAlerts()) {
                List<Alert> clusterAlerts = new ArrayList<Alert>();
                for (AgentAlert aa : status.getAlerts()) {
                  Alert alert = new Alert(aa.getName(), aa.getInstance(),
                      scHost.getServiceName(), scHost.getServiceComponentName(),
                      scHost.getHostName(), aa.getState());
                  alert.setLabel(aa.getLabel());
                  alert.setText(aa.getText());
                 
                  clusterAlerts.add(alert);
                }
               
               if (0 != clusterAlerts.size())
View Full Code Here

Examples of org.apache.logging.log4j.samples.events.Alert

    transfer.setSource("IB Transfer page");
    transfer.setCompletionStatus("complete");
    transfer.setMember(member);
    events.add(transfer);

    final Alert alert = LogEventFactory.getEvent(Alert.class);

    alert.setAction("add");
    alert.setType("balance alert");
    alert.setAccountNumber("REPLACE"); // , getAccount(mbr, accounts));
    alert.setTrigger("GT");
    alert.setThreshold("1000");
    alert.setMember(member);
    events.add(alert);

    final ScheduledTransaction scheduledTransaction = LogEventFactory
        .getEvent(ScheduledTransaction.class);
View Full Code Here

Examples of org.apache.pivot.wtk.Alert

    @Override
    public void install(Component component) {
        super.install(component);

        Alert alert = (Alert)component;
        alert.setPreferredWidth(320);
        alert.setMinimumWidth(160);

        alert.getAlertListeners().add(this);

        // Load the alert content
        BXMLSerializer bxmlSerializer = new BXMLSerializer();

        Component content;
        try {
            content = (Component)bxmlSerializer.readObject(TerraAlertSkin.class,
                "terra_alert_skin.bxml");
        } catch(Exception exception) {
            throw new RuntimeException(exception);
        }

        alert.setContent(content);

        typeImageView = (ImageView)bxmlSerializer.getNamespace().get("typeImageView");
        messageLabel = (Label)bxmlSerializer.getNamespace().get("messageLabel");
        messageBoxPane = (BoxPane)bxmlSerializer.getNamespace().get("messageBoxPane");
        optionButtonBoxPane = (BoxPane)bxmlSerializer.getNamespace().get("optionButtonBoxPane");

        for (Object option : alert.getOptions()) {
            PushButton optionButton = new PushButton(option);
            optionButton.setStyleName(TerraAlertSkin.class.getPackage().getName()
                + "." + TerraTheme.COMMAND_BUTTON_STYLE);
            optionButton.getButtonPressListeners().add(optionButtonPressListener);
View Full Code Here

Examples of org.apache.pivot.wtk.Alert

    @Override
    public void windowOpened(Window window) {
        super.windowOpened(window);

        Alert alert = (Alert)window;
        int index = alert.getSelectedOptionIndex();

        if (index >= 0) {
            optionButtonBoxPane.get(index).requestFocus();
        } else {
            window.requestFocus();
View Full Code Here

Examples of org.apache.pivot.wtk.Alert

    @Override
    public void install(Component component) {
        super.install(component);

        Alert alert = (Alert)component;
        alert.getAlertListeners().add(this);

        // Load the alert content
        WTKXSerializer wtkxSerializer = new WTKXSerializer();
        Component content = null;

        try {
            content = (Component)wtkxSerializer.readObject(this, "terra_alert_skin.wtkx");
        } catch(Exception exception) {
            throw new RuntimeException(exception);
        }

        alert.setContent(content);

        // Set the type image
        TerraTheme theme = (TerraTheme)Theme.getTheme();

        ImageView typeImageView = (ImageView)wtkxSerializer.get("typeImageView");
        typeImageView.setImage(theme.getMessageIcon(alert.getMessageType()));

        // Set the message
        Label messageLabel = (Label)wtkxSerializer.get("messageLabel");
        String message = alert.getMessage();
        messageLabel.setText(message);

        // Set the body
        BoxPane messageBoxPane = (BoxPane)wtkxSerializer.get("messageBoxPane");
        Component body = alert.getBody();
        if (body != null) {
            messageBoxPane.add(body);
        }

        // Add the option buttons
        BoxPane buttonBoxPane = (BoxPane)wtkxSerializer.get("buttonBoxPane");

        for (int i = 0, n = alert.getOptionCount(); i < n; i++) {
            Object option = alert.getOption(i);

            PushButton optionButton = new PushButton(option);
            optionButton.setStyles(commandButtonStyles);

            optionButton.getButtonPressListeners().add(new ButtonPressListener() {
                @Override
                public void buttonPressed(Button button) {
                    int optionIndex = optionButtons.indexOf(button);

                    if (optionIndex >= 0) {
                        Alert alert = (Alert)getComponent();
                        alert.setSelectedOption(optionIndex);
                        alert.close(true);
                    }
                }
            });

            buttonBoxPane.add(optionButton);
View Full Code Here

Examples of org.apache.pivot.wtk.Alert

    @Override
    public void windowOpened(Window window) {
        super.windowOpened(window);

        Alert alert = (Alert)window;
        int index = alert.getSelectedOption();

        if (index >= 0) {
            optionButtons.get(index).requestFocus();
        } else {
            window.requestFocus();
View Full Code Here

Examples of org.apache.pivot.wtk.Alert

        if (alert == null) {
            ArrayList<String> options = new ArrayList<String>();
            options.add("Yes");
            options.add("No");

            alert = new Alert(MessageType.QUESTION, "Cancel shutdown?", options);
            alert.open(display, new DialogCloseListener() {
                public void dialogClosed(Dialog dialog, boolean modal) {
                    Alert alert = (Alert)dialog;

                    if (alert.getResult()) {
                        if (alert.getSelectedOption() == 1) {
                            cancelShutdown = false;
                            DesktopApplicationContext.exit();
                        }
                    }
View Full Code Here

Examples of org.apache.pivot.wtk.Alert

                                body = (Component)wtkxSerializer.readObject(this, "alert.wtkx");
                            } catch(Exception exception) {
                                System.err.println(exception);
                            }

                            Alert alert = new Alert(MessageType.QUESTION, "Please select your favorite icon:",
                                options, body);
                            alert.setTitle("Select Icon");
                            alert.setSelectedOption(0);
                            alert.getDecorators().update(0, new ReflectionDecorator());
                            alert.open(window);
                        } else {
                            String message = (String)userData.get("message");
                            Alert.alert(MessageType.valueOf(messageType.toUpperCase()), message, window);
                        }
                    }
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.