Package org.zaproxy.zap.model
Interface MessageLocation
-
- All Superinterfaces:
java.lang.Comparable<MessageLocation>
- All Known Subinterfaces:
HttpMessageLocation
,TextHttpMessageLocation
- All Known Implementing Classes:
DefaultTextHttpMessageLocation
public interface MessageLocation extends java.lang.Comparable<MessageLocation>
A location in aMessage
. Either a value (for example, a string, a number...) or a single (insertion) point.- Since:
- 2.4.0
- See Also:
Message
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
getDescription()
Gets the description of this location in the message.java.lang.Class<? extends Message>
getTargetMessageClass()
java.lang.String
getValue()
Gets the value represented by this location.boolean
overlaps(MessageLocation otherLocation)
Tells whether or not the given location overlaps with this location.
-
-
-
Method Detail
-
getTargetMessageClass
java.lang.Class<? extends Message> getTargetMessageClass()
-
getDescription
java.lang.String getDescription()
Gets the description of this location in the message.Should be internationalised as it might be shown in GUI components.
Examples, of possible descriptions:
Example 1: This message location represents a POST parameter, in an HTTP message, it could return:
POST parameter
Example 2: It's manually selected a value of a HTTP request header, it could return:
Header [start index, end index]
For text selections is advised to return the coordinates of the selected content or position.
- Returns:
- the description of the location in the message
-
getValue
java.lang.String getValue()
Gets the value represented by this location. It might be empty if it represents an insertion position.- Returns:
- the value represented by this location, empty if a position
-
overlaps
boolean overlaps(MessageLocation otherLocation)
Tells whether or not the given location overlaps with this location.Locations of non compatible types (for example, text and AMF) should return
true
.- Parameters:
otherLocation
- other location to test for overlapping- Returns:
true
if theotherLocation
overlaps with this one,false
otherwise.
-
-