Esempio n. 1
0
  public String updateUserRole() {

    String getDataUrl = Property.getDomain_url();
    Map<String, String> user = new HashMap();
    user.put("alertId", alertId);
    user.put("userName", userName);
    /*User user = new User();
    user.setAlertId(alertId);
    user.setUserName(userName);*/
    Map<String, String> formData = new HashMap();
    formData.put("update_alert_prole", new Gson().toJson(user));

    try {
      String result =
          (String)
              RestUtil.post(
                  getDataUrl + "bcc/update_alert_prole",
                  String.class,
                  formData,
                  MediaType.APPLICATION_FORM_URLENCODED);
      // String result = (String)
      // RestUtil.post("http://173.39.29.171:8080/om_data_service/bcc/update_alert_prole ",
      // String.class, formData, MediaType.APPLICATION_FORM_URLENCODED);
      // System.out.println("result is--"+result);
    } catch (Exception e) {
      e.printStackTrace();
    }
    return "success";
  }
Esempio n. 2
0
  public String getBccEscalationsData() {
    Map<String, String> bccDataMap = new HashMap<String, String>();
    bccDataMap.put("targetColl", "bcc_escalation");

    try {
      String getDataUrl = Property.getDomain_url() + "dataService";
      bccEscalationData =
          (String)
              RestUtil.post(
                  getDataUrl, String.class, bccDataMap, MediaType.APPLICATION_FORM_URLENCODED);

    } catch (Exception e) {
      e.printStackTrace();
    }
    return "success";
  }
Esempio n. 3
0
  public String getBccAlerts() {
    Map<String, String> bccDataMap = new HashMap<String, String>();
    bccDataMap.put("targetColl", "bcc_alerts");
    bccDataMap.put("optionalPara", "ALERT_STATUS:open");

    try {
      String getDataUrl = Property.getDomain_url() + "dataService";
      bccAlertsData =
          (String)
              RestUtil.post(
                  getDataUrl, String.class, bccDataMap, MediaType.APPLICATION_FORM_URLENCODED);
      // System.out.println("bccAlerts::"+bccAlertsData);
    } catch (Exception e) {
      e.printStackTrace();
    }
    return "success";
  }
Esempio n. 4
0
  public String getHomePageData() {
    Map<String, String> bccDataMap = new HashMap<String, String>();
    bccDataMap.put("targetColl", "bcc_monitoring");
    bccDataMap.put("optionalPara", "UNIT_NAME:Commerce");

    try {
      String getDataUrl = Property.getDomain_url() + "dataService";
      jsonData =
          (String)
              RestUtil.post(
                  getDataUrl, String.class, bccDataMap, MediaType.APPLICATION_FORM_URLENCODED);

    } catch (Exception e) {
      e.printStackTrace();
    }
    return "success";
  }