Package org.zaproxy.clientapi.core
Class Alert
- java.lang.Object
-
- org.zaproxy.clientapi.core.Alert
-
public class Alert extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Alert.Confidence
static class
Alert.Reliability
Deprecated.(2.4.0) Replaced byAlert.Confidence
.static class
Alert.Risk
-
Constructor Summary
Constructors Constructor Description Alert(java.lang.String name, java.lang.String url)
Alert(java.lang.String name, java.lang.String url, java.lang.String riskStr, java.lang.String confidenceStr, java.lang.String param, java.lang.String other)
Alert(java.lang.String name, java.lang.String url, Alert.Risk risk, Alert.Confidence confidence)
Alert(java.lang.String name, java.lang.String url, Alert.Risk risk, Alert.Confidence confidence, java.lang.String param, java.lang.String other)
Alert(java.lang.String name, java.lang.String url, Alert.Risk risk, Alert.Confidence confidence, java.lang.String param, java.lang.String other, java.lang.String attack, java.lang.String description, java.lang.String reference, java.lang.String solution, java.lang.String evidence, int cweId, int wascId)
Alert(ApiResponseSet apiResponseSet)
Constructs anAlert
from the givenApiResponseSet
.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
equals(java.lang.Object object)
java.lang.String
getAlert()
Deprecated.(1.1.0) UsegetName()
instead.java.lang.String
getAttack()
Alert.Confidence
getConfidence()
int
getCweId()
java.lang.String
getDescription()
java.lang.String
getEvidence()
java.lang.String
getId()
Gets the ID of the alert.java.lang.String
getMessageId()
Gets the ID of the HTTP message of the alert.java.lang.String
getName()
Gets the name of the alert.java.lang.String
getOther()
java.lang.String
getParam()
java.lang.String
getPluginId()
Gets the ID of the plugin/scanner that raised the alert.java.lang.String
getReference()
Alert.Reliability
getReliability()
Deprecated.getConfidence()
Use of reliability has been deprecated in favour of using confidenceAlert.Risk
getRisk()
java.lang.String
getSolution()
java.lang.String
getUrl()
int
getWascId()
int
hashCode()
boolean
matches(Alert alertFilter)
void
setAlert(java.lang.String name)
Deprecated.(1.1.0) UsesetName(String)
instead.void
setConfidence(java.lang.String confidence)
void
setConfidence(Alert.Confidence confidence)
void
setName(java.lang.String name)
Sets the name of the alert.void
setOther(java.lang.String other)
void
setParam(java.lang.String param)
void
setReliability(java.lang.String reliability)
Deprecated.setConfidence(String)
Use of reliability has been deprecated in favour of using confidencevoid
setReliability(Alert.Reliability reliability)
Deprecated.setConfidence(Confidence)
Use of reliability has been deprecated in favour of using confidencevoid
setRisk(java.lang.String risk)
void
setRisk(Alert.Risk risk)
void
setUrl(java.lang.String url)
java.lang.String
toString()
-
-
-
Constructor Detail
-
Alert
public Alert(ApiResponseSet apiResponseSet)
Constructs anAlert
from the givenApiResponseSet
.- Parameters:
apiResponseSet
- theApiResponseSet
returned from an alert related ZAP API call.- Since:
- 1.1.0
-
Alert
public Alert(java.lang.String name, java.lang.String url, java.lang.String riskStr, java.lang.String confidenceStr, java.lang.String param, java.lang.String other)
-
Alert
public Alert(java.lang.String name, java.lang.String url, Alert.Risk risk, Alert.Confidence confidence, java.lang.String param, java.lang.String other, java.lang.String attack, java.lang.String description, java.lang.String reference, java.lang.String solution, java.lang.String evidence, int cweId, int wascId)
-
Alert
public Alert(java.lang.String name, java.lang.String url, Alert.Risk risk, Alert.Confidence confidence, java.lang.String param, java.lang.String other)
-
Alert
public Alert(java.lang.String name, java.lang.String url, Alert.Risk risk, Alert.Confidence confidence)
-
Alert
public Alert(java.lang.String name, java.lang.String url)
-
-
Method Detail
-
getId
public java.lang.String getId()
Gets the ID of the alert.- Returns:
- the ID of the alert.
- Since:
- 1.1.0
-
getPluginId
public java.lang.String getPluginId()
Gets the ID of the plugin/scanner that raised the alert.- Returns:
- the ID of the plugin/scanner that raised the alert.
- Since:
- 1.1.0
-
getMessageId
public java.lang.String getMessageId()
Gets the ID of the HTTP message of the alert.- Returns:
- the ID of the HTTP message.
- Since:
- 1.1.0
-
getName
public java.lang.String getName()
Gets the name of the alert.- Returns:
- the name of the alert
- Since:
- 1.1.0
-
setName
public void setName(java.lang.String name)
Sets the name of the alert.- Parameters:
name
- the name of the alert- Since:
- 1.1.0
-
getAlert
@Deprecated public java.lang.String getAlert()
Deprecated.(1.1.0) UsegetName()
instead.Gets the name of the alert.- Returns:
- the name of the alert
-
setAlert
@Deprecated public void setAlert(java.lang.String name)
Deprecated.(1.1.0) UsesetName(String)
instead.Sets the name of the alert.- Parameters:
name
- the name of the alert
-
getRisk
public Alert.Risk getRisk()
-
setRisk
public void setRisk(Alert.Risk risk)
-
setRisk
public void setRisk(java.lang.String risk)
-
getReliability
@Deprecated public Alert.Reliability getReliability()
Deprecated.getConfidence()
Use of reliability has been deprecated in favour of using confidence
-
setReliability
@Deprecated public void setReliability(Alert.Reliability reliability)
Deprecated.setConfidence(Confidence)
Use of reliability has been deprecated in favour of using confidence
-
setReliability
@Deprecated public void setReliability(java.lang.String reliability)
Deprecated.setConfidence(String)
Use of reliability has been deprecated in favour of using confidence
-
getConfidence
public Alert.Confidence getConfidence()
-
setConfidence
public void setConfidence(Alert.Confidence confidence)
-
setConfidence
public void setConfidence(java.lang.String confidence)
-
getUrl
public java.lang.String getUrl()
-
setUrl
public void setUrl(java.lang.String url)
-
getOther
public java.lang.String getOther()
-
setOther
public void setOther(java.lang.String other)
-
getParam
public java.lang.String getParam()
-
setParam
public void setParam(java.lang.String param)
-
getAttack
public java.lang.String getAttack()
-
getDescription
public java.lang.String getDescription()
-
getReference
public java.lang.String getReference()
-
getSolution
public java.lang.String getSolution()
-
getEvidence
public java.lang.String getEvidence()
-
getCweId
public int getCweId()
-
getWascId
public int getWascId()
-
matches
public boolean matches(Alert alertFilter)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object object)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-