Class Alert


  • public class Alert
    extends java.lang.Object
    • Constructor Detail

      • Alert

        public Alert​(ApiResponseSet apiResponseSet)
        Constructs an Alert from the given ApiResponseSet.
        Parameters:
        apiResponseSet - the ApiResponseSet 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)
    • 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) Use getName() 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) Use setName(String) instead.
        Sets the name of the alert.
        Parameters:
        name - the name of the alert
      • 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​(java.lang.String reliability)
        Deprecated.
        setConfidence(String) Use of reliability has been deprecated in favour of using 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 class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object object)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object