Package org.parosproxy.paros.db

Examples of org.parosproxy.paros.db.TableAlert


      return treeAlert;
  }
 
  private void writeAlertToDB(Alert alert) throws HttpMalformedHeaderException, SQLException {

      TableAlert tableAlert = getModel().getDb().getTableAlert();
        HistoryReference ref = new HistoryReference(getModel().getSession(), HistoryReference.TYPE_SCANNER, alert.getMessage());
        RecordAlert recordAlert = tableAlert.write(
                recordScan.getScanId(), alert.getPluginId(), alert.getAlert(), alert.getRisk(), alert.getReliability(),
                alert.getDescription(), alert.getUri(), alert.getParam(), alert.getOtherInfo(), alert.getSolution(), alert.getReference(),
            ref.getHistoryId()
                );
       
View Full Code Here


        }
  }
 
  private void refreshAlert(Session session) throws SQLException {

      TableAlert tableAlert = getModel().getDb().getTableAlert();
      Vector v = tableAlert.getAlertListBySession(session.getSessionId());
     
      for (int i=0; i<v.size(); i++) {
          int alertId = ((Integer) v.get(i)).intValue();
          RecordAlert recAlert = tableAlert.read(alertId);
          Alert alert = new Alert(recAlert);
          addAlertToDisplay(alert);
      }
  }
View Full Code Here

    return treeAlert;
  }

  private void writeAlertToDB(Alert alert) throws HttpMalformedHeaderException, SQLException {

    TableAlert tableAlert = getModel().getDb().getTableAlert();
    HistoryReference ref = new HistoryReference(getModel().getSession(), HistoryReference.TYPE_SCANNER, alert.getMessage());
   
    // ZAP: cope with recordScan being null
        int scanId = 0;
        if (recordScan != null) {
          scanId = recordScan.getScanId();
        }
       
    RecordAlert recordAlert = tableAlert.write(scanId, alert.getPluginId(),
        alert.getAlert(), alert.getRisk(), alert.getReliability(),
        alert.getDescription(), alert.getUri(), alert.getParam(),
        alert.getOtherInfo(), alert.getSolution(),
        alert.getReference(), ref.getHistoryId(),
        alert.getSourceHistoryId());
View Full Code Here

 

    // ZAP: Added updateAlertInDB
  public void updateAlertInDB(Alert alert) throws HttpMalformedHeaderException, SQLException {

      TableAlert tableAlert = getModel().getDb().getTableAlert();
      tableAlert.update(alert.getAlertId(), alert.getAlert(), alert.getRisk(),
          alert.getReliability(), alert.getDescription(), alert.getUri(),
          alert.getParam(), alert.getOtherInfo(), alert.getSolution(),
          alert.getReference(), alert.getSourceHistoryId());
  }
View Full Code Here

        }
  }

  private void refreshAlert(Session session) throws SQLException {

    TableAlert tableAlert = getModel().getDb().getTableAlert();
    Vector<Integer> v = tableAlert.getAlertListBySession(session.getSessionId());

    for (int i = 0; i < v.size(); i++) {
      int alertId = ((Integer) v.get(i)).intValue();
      RecordAlert recAlert = tableAlert.read(alertId);
      Alert alert = new Alert(recAlert);
      addAlertToDisplay(alert);
    }
  }
View Full Code Here

TOP

Related Classes of org.parosproxy.paros.db.TableAlert

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.