Examples of Alert


Examples of com.alexgilleran.icesoap.parser.test.xmlclasses.Alert

  @Test
  public void testListOfStrings() throws XMLParsingException {
    IceSoapParser<Alert> parser = new IceSoapParserImpl<Alert>(Alert.class);

    Alert testResult = parser.parse(SampleXml.getListOfStringsXML());

    assertEquals(1, testResult.getId());
    assertEquals("Jonas", testResult.getContact());
    assertEquals("some_email", testResult.getEmail());
    assertEquals("555-555555", testResult.getPhone());

    assertEquals("Fire", testResult.getActiveGroupsPerEmail().get(0));
    assertEquals(null, testResult.getActiveGroupsPerEmail().get(1));
    assertEquals("OpenClose", testResult.getActiveGroupsPerEmail().get(2));

    assertEquals(SampleXml.SMS_ALERT_GROUP_1, testResult.getActiveGroupsPerSMS().get(0));
    assertEquals(SampleXml.SMS_ALERT_GROUP_2, testResult.getActiveGroupsPerSMS().get(1));
  }
View Full Code Here

Examples of com.centraview.alert.Alert

  private void deleteAlert(int individualID, int alertID, String dataSource)
  {
    try
    {
      AlertHome ah = (AlertHome)CVUtility.getHomeObject("com.centraview.alert.AlertHome", "Alert");
      Alert remote = ah.create();
      remote.setDataSource(dataSource);
      remote.deleteAlert(alertID, individualID);
    }catch(Exception e){
      logger.error("[AlertServlet] Exception thrown in deleteAlert(): ", e);
    }
  }
View Full Code Here

Examples of com.centraview.alert.Alert

    hmConf.put("UserID", new Integer(individualID));
   
    try
    {
      AlertHome home = (AlertHome)CVUtility.getHomeObject("com.centraview.alert.AlertHome", "Alert");
      Alert remote = (Alert)home.create();
      remote.setDataSource(dataSource);
     
      Collection results = remote.getAlertList(hmConf);
      if (results != null && results.size() > 0)
      {
        Iterator it = results.iterator();
        while (it.hasNext())
        {
View Full Code Here

Examples of com.claymus.gwt.Alert

        ManageContents.saveButton.removeAttribute("disabled");
      }

      @Override
      public void onCallFailure(Throwable caught) {
        Alert alert = new Alert(caught);
        alert.addHideButton();
        alert.show();
        ManageContents.saveButton.setInnerText("Save Contents Order");
        ManageContents.saveButton.removeAttribute("disabled");
      }

    });
View Full Code Here

Examples of com.claymus.gwt.Alert

        contentDTO.setRoleList(ContentEditor.this.visibleTo.getSelectedRoles());
        ContentEditor.this.contentService.update(encoded, contentDTO, new AsyncCallbackWithMsg<Void>(){

          @Override
          public void onCallSuccess(Void result) {
            Alert alert = new Alert("Success !", "Content Updated Successfully !");
            alert.addButton("Done", new ClickHandler() {

              @Override
              public void onClick(ClickEvent event) {
                Window.Location.assign("/_ah/content?page=" + pageEncoded);
              }

            });
            alert.show();
          };

          @Override
          public void onCallFailure(Throwable caught) {
            Alert alert = new Alert(caught);
            alert.addHideButton();
            alert.show();
            ContentEditor.this.form.setEnabled(true);
          }

        });
      }
    });

    this.contentService.get(pageEncoded, encoded, new AsyncCallbackWithMsg<ContentDTO>(){

      @Override
      public final void onCallSuccess(ContentDTO moduleDTO) {
        ContentEditor.this.putDTO(moduleDTO);
        for(String[] loc : moduleDTO.getLocations())
          ContentEditor.this.location.addItem(loc[0], loc[1]);
        ContentEditor.this.location.setValue(moduleDTO.getLocation());
        for(String[] role : moduleDTO.getRoles())
          ContentEditor.this.visibleTo.addRole(role[1], role[0]);
        ContentEditor.this.visibleTo.setSelection(moduleDTO.getVisibleTo());
        ContentEditor.this.visibleTo.setSelectedRoles(moduleDTO.getRoleList());
        ContentEditor.this.form.setStateAsDefault();
      }

      @Override
      public void onCallFailure(Throwable caught)  {
        Alert alert = new Alert(caught);
        alert.addButton("Reload Page", new ClickHandler() {

          @Override
          public void onClick(ClickEvent event) {
            Window.Location.reload();
          }

        });
        alert.addHideButton();
        alert.show();
      }

    });
  }
View Full Code Here

Examples of com.claymus.gwt.Alert

        ManageBlocks.saveButton.removeAttribute("disabled");
      }

      @Override
      public void onCallFailure(Throwable caught) {
        Alert alert = new Alert(caught);
        alert.addHideButton();
        alert.show();
        ManageBlocks.saveButton.setInnerText("Save Blocks Order");
        ManageBlocks.saveButton.removeAttribute("disabled");
      }

    });
View Full Code Here

Examples of com.claymus.gwt.Alert

        blockDTO.setNotVisibleAt(new LinkedList<String>(Arrays.asList(BlockEditor.this.notVisibleAt.getTexts())));
        BlockEditor.this.blockService.add(blockDTO, new AsyncCallbackWithMsg<Void>(){

          @Override
          public void onCallSuccess(Void result) {
            Alert alert = new Alert("Success !", "Block Created Successfully !");
            alert.addButton("Add Another Block", new ClickHandler() {

              @Override
              public void onClick(ClickEvent event) {
                Window.Location.assign("/_ah/block/add");
              }

            });
            alert.addButton("Done", new ClickHandler() {

              @Override
              public void onClick(ClickEvent event) {
                Window.Location.assign("/_ah/block");
              }

            });
            alert.show();
          }

          @Override
          public void onCallFailure(Throwable caught) {
            Alert alert = new Alert(caught);
            alert.addHideButton();
            alert.show();
            BlockEditor.this.form.setEnabled(true);
          }

        });
      }

    });

    this.blockService.getLocations(new AsyncCallbackWithMsg<String[][]>() {

      @Override
      public void onCallSuccess(String[][] locations) {
        for(String[] loc : locations)
          BlockEditor.this.location.addItem(loc[0], loc[1]);
        BlockEditor.this.location.setStateAsDefault();
      }

      @Override
      public void onCallFailure(Throwable caught) {
        Alert alert = new Alert(caught);
        alert.addButton("Reload Page", new ClickHandler() {

          @Override
          public void onClick(ClickEvent event) {
            Window.Location.reload();
          }

        });
        alert.addHideButton();
        alert.show();
      }

    });

    this.blockService.getRoles(new AsyncCallbackWithMsg<String[][]>() {

      @Override
      public void onCallSuccess(String[][] roleList) {
        for(String[] role : roleList)
          BlockEditor.this.visibleTo.addRole(role[1], role[0]);
        BlockEditor.this.visibleTo.setSelection(0);
        BlockEditor.this.visibleTo.setStateAsDefault();
      }

      @Override
      public void onCallFailure(Throwable caught) {
        Alert alert = new Alert(caught);
        alert.addButton("Reload Page", new ClickHandler() {

          @Override
          public void onClick(ClickEvent event) {
            Window.Location.reload();
          }

        });
        alert.addHideButton();
        alert.show();
      }

    });
  }
View Full Code Here

Examples of com.claymus.gwt.Alert

        blockDTO.setNotVisibleAt(new LinkedList<String>(Arrays.asList(BlockEditor.this.notVisibleAt.getTexts())));
        BlockEditor.this.blockService.update(encoded, blockDTO, new AsyncCallbackWithMsg<Void>(){

          @Override
          public final void onCallSuccess(Void result) {
            Alert alert = new Alert("Success !", "Block Updated Successfully !");
            alert.addButton("Done", new ClickHandler() {

              @Override
              public void onClick(ClickEvent event) {
                Window.Location.assign("/_ah/block");
              }

            });
            alert.show();
          };

          @Override
          public final void onCallFailure(Throwable caught) {
            Alert alert = new Alert(caught);
            alert.addHideButton();
            alert.show();
            BlockEditor.this.form.setEnabled(true);
          }

        });
      }
    });

    this.blockService.get(encoded, new AsyncCallbackWithMsg<BlockDTO>() {

      @Override
      public final void onCallSuccess(BlockDTO moduleDTO) {
        BlockEditor.this.putDTO(moduleDTO);
        for(String[] loc : moduleDTO.getLocations())
          BlockEditor.this.location.addItem(loc[0], loc[1]);
        BlockEditor.this.location.setValue(moduleDTO.getLocation());
        for(String[] role : moduleDTO.getRoles())
          BlockEditor.this.visibleTo.addRole(role[1], role[0]);
        BlockEditor.this.visibleTo.setSelection(moduleDTO.getVisibleTo());
        BlockEditor.this.visibleTo.setSelectedRoles(moduleDTO.getRoleList());
        BlockEditor.this.visibleAt.setTexts(moduleDTO.getVisibleAt().toArray(new String[0]));
        BlockEditor.this.notVisibleAt.setTexts(moduleDTO.getNotVisibleAt().toArray(new String[0]));
        BlockEditor.this.form.setStateAsDefault();
      }

      @Override
      public void onCallFailure(Throwable caught)  {
        Alert alert = new Alert(caught);
        alert.addButton("Reload Page", new ClickHandler() {

          @Override
          public void onClick(ClickEvent event) {
            Window.Location.reload();
          }

        });
        alert.addHideButton();
        alert.show();
      }

    });
  }
View Full Code Here

Examples of com.codeforces.graygoose.model.Alert

            List<RuleAlertRelation> ruleAlertRelations = ruleAlertRelationDao.findAllByRule(ruleId);

            for (RuleAlertRelation ruleAlertRelation : ruleAlertRelations) {
                if (ruleAlertRelation.getMaxConsecutiveFailCount() <= currentConsecutiveFailCount) {
                    Alert alert = alertDao.find(ruleAlertRelation.getAlertId());

                    if (alert != null) {
                        List<AlertTriggerEvent> alertTriggersForLastHour =
                                alertTriggerEventDao.findAllByAlertForPeriod(
                                        alert.getId(), currentTimeMillis - TimeConstants.MILLIS_PER_HOUR, currentTimeMillis);
                        if (alertTriggersForLastHour.size() < alert.getMaxAlertCountPerHour()) {
                            neededAlerts.add(alert);
                        }
                    }
                }
            }
View Full Code Here

Examples of com.dianping.cat.home.dal.report.Alert

  @Inject
  private AlertDao m_alertDao;

  private Alert buildAlert(AlertEntity alertEntity, AlertMessageEntity message) {
    Alert alert = new Alert();

    alert.setDomain(alertEntity.getDomain());
    alert.setAlertTime(alertEntity.getDate());
    alert.setCategory(alertEntity.getType());
    alert.setType(alertEntity.getLevel());
    alert.setContent(message.getTitle() + "<br/>" + message.getContent());
    alert.setMetric(alertEntity.getMetric());

    return alert;
  }
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.