}
}
public Alert getAlert() {
if (! editable && originalAlert != null) {
Alert alert = originalAlert.newInstance();
alert.setAlertId(originalAlert.getAlertId());
alert.setAlert((String)alertEditName.getSelectedItem());
alert.setParam((String)alertEditParam.getSelectedItem());
alert.setRiskReliability(alertEditRisk.getSelectedIndex(), alertEditReliability.getSelectedIndex());
alert.setDescription(alertDescription.getText());
alert.setOtherInfo(alertOtherInfo.getText());
alert.setSolution(alertSolution.getText());
alert.setReference(alertReference.getText());
alert.setHistoryRef(historyRef);
return alert;
} else {
Alert alert = new Alert(-1, alertEditRisk.getSelectedIndex(),
alertEditReliability.getSelectedIndex(), (String) alertEditName.getSelectedItem());
alert.setHistoryRef(historyRef);
if (originalAlert != null) {
alert.setAlertId(originalAlert.getAlertId());
}
String uri = null;
HttpMessage msg = null;
if (historyRef != null) {
try {
uri = historyRef.getHttpMessage().getRequestHeader().getURI().toString();
msg = historyRef.getHttpMessage();
} catch (Exception e) {
e.printStackTrace();
}
} else if (originalAlert != null) {
uri = originalAlert.getUri();
msg = originalAlert.getMessage();
}
alert.setDetail(alertDescription.getText(),
uri,
(String)alertEditParam.getSelectedItem(),
alertOtherInfo.getText(),
alertSolution.getText(),
alertReference.getText(),