Package burp.api.montoya.persistence
Interface PersistedObject
public interface PersistedObject
[Professional only] Enables data to be stored and accessed from the Burp project.
Supports HTTP requests, HTTP responses, byte arrays, primitives, lists of all these, and object hierarchies.
-
Method Summary
Modifier and TypeMethodDescriptionRetrieve all keys currently mapped forBoolean
values.Retrieve all keys currently mapped forBoolean
Lists.Retrieve all keys currently mapped forByteArray
values.Retrieve all keys currently mapped forByteArray
Lists.byteKeys()
Retrieve all keys currently mapped forByte
values.Retrieve all keys currently mapped forPersistedObject
objects.void
deleteBoolean
(String key) Removes the mapping of the specified key to theBoolean
.void
deleteBooleanList
(String key) Removes the mapping of the specified key to thePersistedList
ofBoolean
.void
deleteByte
(String key) Removes the mapping of the specified key to theByte
.void
deleteByteArray
(String key) Removes the mapping of the specified key to theByteArray
.void
Removes the mapping of the specified key to thePersistedList
ofByteArray
.void
deleteChildObject
(String key) Removes the mapping of the specified key to thePersistedObject
.void
deleteHttpRequest
(String key) Removes the mapping of the specified key to theHttpRequest
.void
Removes the mapping of the specified key to thePersistedList
ofHttpRequest
.void
Removes the mapping of the specified key to theHttpRequestResponse
.void
Removes the mapping of the specified key to thePersistedList
ofHttpRequestResponse
.void
deleteHttpResponse
(String key) Removes the mapping of the specified key to theHttpResponse
.void
Removes the mapping of the specified key to thePersistedList
ofHttpResponse
.void
deleteInteger
(String key) Removes the mapping from the specified key to theInteger
.void
deleteIntegerList
(String key) Removes the mapping of the specified key to thePersistedList
ofInteger
.void
deleteLong
(String key) Removes the mapping from the specified key to theLong
.void
deleteLongList
(String key) Removes the mapping of the specified key to thePersistedList
ofLong
.void
deleteShort
(String key) Removes the mapping from the specified key to theShort
.void
deleteShortList
(String key) Removes the mapping of the specified key to thePersistedList
ofShort
.void
deleteString
(String key) Removes the mapping of the specified key to theString
.void
deleteStringList
(String key) Removes the mapping of the specified key to thePersistedList
ofString
.getBoolean
(String key) Boolean
associated with the specified key, ornull
if this map contains no mapping for the key.getBooleanList
(String key) PersistedList
ofBoolean
associated with the specified key, ornull
if this map contains no mapping for the key.Byte
associated with the specified key, ornull
if this map contains no mapping for the key.getByteArray
(String key) ByteArray
associated with the specified key, ornull
if this map contains no mapping for the key.getByteArrayList
(String key) PersistedList
ofByteArray
associated with the specified key, ornull
if this map contains no mapping for the key.getChildObject
(String key) PersistedObject
associated with the specified key, ornull
if this map contains no mapping for the key.getHttpRequest
(String key) HttpRequest
associated with the specified key, ornull
if this map contains no mapping for the keygetHttpRequestList
(String key) PersistedList
ofHttpRequest
associated with the specified key, ornull
if this map contains no mapping for the key.HttpRequestResponse
associated with the specified key, ornull
if this map contains no mapping for the key.PersistedList
ofHttpRequestResponse
associated with the specified key, ornull
if this map contains no mapping for the key.getHttpResponse
(String key) HttpResponse
associated with the specified key, ornull
if this map contains no mapping for the keyPersistedList
ofHttpResponse
associated with the specified key, ornull
if this map contains no mapping for the key.getInteger
(String key) Integer
associated with the specified key, ornull
if this map contains no mapping for the key.getIntegerList
(String key) PersistedList
ofInteger
associated with the specified key, ornull
if this map contains no mapping for the key.Long
associated with the specified key, ornull
} if this map contains no mapping for the key.getLongList
(String key) PersistedList
ofLong
associated with the specified key, ornull
if this map contains no mapping for the key.Short
associated with the specified key, ornull
if this map contains no mapping for the key.getShortList
(String key) PersistedList
ofShort
associated with the specified key, ornull
if this map contains no mapping for the key.String
associated with the specified key, ornull
if this map contains no mapping for the key.getStringList
(String key) PersistedList
ofString
associated with the specified key, ornull
if this map contains no mapping for the key.Retrieve all keys currently mapped forHttpRequest
values.Retrieve all keys currently mapped forHttpRequest
Lists.Retrieve all keys currently mapped forHttpRequestResponse
values.Retrieve all keys currently mapped forHttpRequestResponse
Lists.Retrieve all keys currently mapped forHttpResponse
values.Retrieve all keys currently mapped forHttpResponse
Lists.Retrieve all keys currently mapped forInteger
values.Retrieve all keys currently mapped forInteger
Lists.longKeys()
Retrieve all keys currently mapped forLong
values.Retrieve all keys currently mapped forLong
Lists.static PersistedObject
Create a new instance ofPersistedObject
.void
setBoolean
(String key, boolean value) Associates the specifiedboolean
with the specified key in this map.void
setBooleanList
(String key, PersistedList<Boolean> value) Associates the specifiedPersistedList
ofBoolean
with the specified key in this map.void
Associates the specifiedbyte
with the specified key in this map This is an optional operation.void
setByteArray
(String key, ByteArray value) Associates the specifiedByteArray
with the specified key in this map.void
setByteArrayList
(String key, PersistedList<ByteArray> value) Associates the specifiedPersistedList
ofByteArray
with the specified key in this map.void
setChildObject
(String key, PersistedObject childObject) Associates the specifiedPersistedObject
with the specified key in this map.void
setHttpRequest
(String key, HttpRequest value) Associates the specifiedHttpRequest
with the specified key in this map.void
setHttpRequestList
(String key, PersistedList<HttpRequest> value) Associates the specifiedPersistedList
ofHttpRequest
with the specified key in this map.void
setHttpRequestResponse
(String key, HttpRequestResponse value) Associates the specifiedHttpRequestResponse
with the specified key in this map.void
setHttpRequestResponseList
(String key, PersistedList<HttpRequestResponse> value) Associates the specifiedPersistedList
ofHttpRequestResponse
with the specified key in this map.void
setHttpResponse
(String key, HttpResponse value) Associates the specifiedHttpResponse
with the specified key in this map.void
setHttpResponseList
(String key, PersistedList<HttpResponse> value) Associates the specifiedPersistedList
ofHttpResponse
with the specified key in this map.void
setInteger
(String key, int value) Associates the specifiedint
with the specified key in this map This is an optional operation.void
setIntegerList
(String key, PersistedList<Integer> value) Associates the specifiedPersistedList
ofInteger
with the specified key in this map.void
Associates the specifiedlong
with the specified key in this map.void
setLongList
(String key, PersistedList<Long> value) Associates the specifiedPersistedList
ofLong
with the specified key in this map.void
Associates the specified short with the specified key in this map This is an optional operation.void
setShortList
(String key, PersistedList<Short> value) Associates the specifiedPersistedList
ofShort
with the specified key in this map.void
Associates the specifiedString
with the specified key in this map.void
setStringList
(String key, PersistedList<String> value) Associates the specifiedPersistedList
ofString
with the specified key in this map.Retrieve all keys currently mapped forShort
values.Retrieve all keys currently mapped forShort
Lists.Retrieve all keys currently mapped forString
values.Retrieve all keys currently mapped forString
Lists.
-
Method Details
-
getChildObject
PersistedObject
associated with the specified key, ornull
if this map contains no mapping for the key.- Parameters:
key
- The key whose associated value is to be returned.- Returns:
- The value to which the specified key is mapped, or
null
if this map contains no mapping for the key.
-
setChildObject
Associates the specifiedPersistedObject
with the specified key in this map. If the map previously contained a mapping for the key, the old value is replaced by the specified value.- Parameters:
key
- The key with which the specified child object is to be associated.childObject
- ThePersistedObject
to be associated with the specified key.
-
deleteChildObject
Removes the mapping of the specified key to thePersistedObject
.- Parameters:
key
- The key whose mapping is to be deleted.
-
childObjectKeys
Retrieve all keys currently mapped forPersistedObject
objects.- Returns:
- Set of keys.
-
getString
String
associated with the specified key, ornull
if this map contains no mapping for the key.- Parameters:
key
- The key whose associated value is to be returned.- Returns:
- The value associated with the specified key, or
null
if this map contains no mapping for the key.
-
setString
Associates the specifiedString
with the specified key in this map. This is an optional operation. If the map previously contained a mapping for the key, the old value is replaced by the specified value.- Parameters:
key
- The key with which the specified value is to be associated.value
- The value to be associated with the specified key.
-
deleteString
Removes the mapping of the specified key to theString
.- Parameters:
key
- The key whose mapping is to be deleted.
-
stringKeys
Retrieve all keys currently mapped forString
values.- Returns:
- Set of keys.
-
getBoolean
Boolean
associated with the specified key, ornull
if this map contains no mapping for the key.- Parameters:
key
- The key whose associated value is to be returned.- Returns:
- The value associated with the specified key, or
null
if this map contains no mapping for the key.
-
setBoolean
Associates the specifiedboolean
with the specified key in this map. This is an optional operation. If the map previously contained a mapping for the key, the old value is replaced by the specified value.- Parameters:
key
- The key with which the specified value is to be associated.value
- The value to be associated with the specified key. If this value isnull
then any value that is currently mapped to the specified key is removed.
-
deleteBoolean
Removes the mapping of the specified key to theBoolean
.- Parameters:
key
- The key whose mapping is to be deleted.
-
booleanKeys
Retrieve all keys currently mapped forBoolean
values.- Returns:
- Set of keys.
-
getByte
Byte
associated with the specified key, ornull
if this map contains no mapping for the key.- Parameters:
key
- The key whose associated value is to be returned.- Returns:
- The value associated with the specified key, or
null
if this map contains no mapping for the key.
-
setByte
Associates the specifiedbyte
with the specified key in this map This is an optional operation. If the map previously contained a mapping for the key, the old value is replaced by the specified value.- Parameters:
key
- The key with which the specified value is to be associated.value
- The value to be associated with the specified key. If this value isnull
then any value that is currently mapped to the specified key is removed.
-
deleteByte
Removes the mapping of the specified key to theByte
.- Parameters:
key
- The key whose mapping is to be deleted.
-
byteKeys
Retrieve all keys currently mapped forByte
values.- Returns:
- Set of keys.
-
getShort
Short
associated with the specified key, ornull
if this map contains no mapping for the key.- Parameters:
key
- The key whose associated value is to be returned.- Returns:
- The value associated with the specified key, or
null
if this map contains no mapping for the key.
-
setShort
Associates the specified short with the specified key in this map This is an optional operation. If the map previously contained a mapping for the key, the old value is replaced by the specified value.- Parameters:
key
- The key with which the specified value is to be associated.value
- The value to be associated with the specified key. If this value isnull
then any value currently mapped to the specified key is removed.
-
deleteShort
Removes the mapping from the specified key to theShort
.- Parameters:
key
- The key whose mapping is to be deleted.
-
shortKeys
Retrieve all keys currently mapped forShort
values.- Returns:
- Set of keys.
-
getInteger
Integer
associated with the specified key, ornull
if this map contains no mapping for the key.- Parameters:
key
- The key whose associated value is to be returned.- Returns:
- The value associated with the specified key, or
null
if this map contains no mapping for the key.
-
setInteger
Associates the specifiedint
with the specified key in this map This is an optional operation. If the map previously contained a mapping for the key, the old value is replaced by the specified value.- Parameters:
key
- The key with which the specified value is to be associated.value
- The value to be associated with the specified key. If this value isnull
then any value that is currently mapped to the specified key is removed.
-
deleteInteger
Removes the mapping from the specified key to theInteger
.- Parameters:
key
- The key whose mapping is to be deleted.
-
integerKeys
Retrieve all keys currently mapped forInteger
values.- Returns:
- Set of keys.
-
getLong
Long
associated with the specified key, ornull
} if this map contains no mapping for the key.- Parameters:
key
- The key whose associated value is to be returned.- Returns:
- The value associated with the specified key, or
null
if this map contains no mapping for the key.
-
setLong
Associates the specifiedlong
with the specified key in this map. This is an optional operation. If the map previously contained a mapping for the key, the old value is replaced by the specified value.- Parameters:
key
- The key with which the specified value is to be associated.value
- The value to be associated with the specified key. If this value isnull
then any value that is currently mapped to the specified key is removed.
-
deleteLong
Removes the mapping from the specified key to theLong
.- Parameters:
key
- The key whose mapping is to be deleted.
-
longKeys
Retrieve all keys currently mapped forLong
values.- Returns:
- Set of keys.
-
getByteArray
ByteArray
associated with the specified key, ornull
if this map contains no mapping for the key.- Parameters:
key
- The key whose associated value is to be returned.- Returns:
- The value associated with the specified key, or
null
if this map contains no mapping for the key.
-
setByteArray
Associates the specifiedByteArray
with the specified key in this map. If the map previously contained a mapping for the key, the old value is replaced by the specified value.- Parameters:
key
- The key with which the specified value is to be associated.value
- The value to be associated with the specified key.
-
deleteByteArray
Removes the mapping of the specified key to theByteArray
.- Parameters:
key
- The key whose mapping is to be deleted.
-
byteArrayKeys
Retrieve all keys currently mapped forByteArray
values.- Returns:
- Set of keys.
-
getHttpRequest
HttpRequest
associated with the specified key, ornull
if this map contains no mapping for the key- Parameters:
key
- The key whose associated value is to be returned.- Returns:
- The value associated with the specified key, or
null
if this map contains no mapping for the key.
-
setHttpRequest
Associates the specifiedHttpRequest
with the specified key in this map. This is an optional operation. If the map previously contained a mapping for the key, the old value is replaced by the specified value.- Parameters:
key
- The key with which the specified value is to be associated.value
- The value to be associated with the specified key.
-
deleteHttpRequest
Removes the mapping of the specified key to theHttpRequest
.- Parameters:
key
- The key whose mapping is to be deleted.
-
httpRequestKeys
Retrieve all keys currently mapped forHttpRequest
values.- Returns:
- Set of keys.
-
getHttpRequestList
PersistedList
ofHttpRequest
associated with the specified key, ornull
if this map contains no mapping for the key.- Parameters:
key
- The key whose associated value is to be returned.- Returns:
- The value associated with the specified key, or
null
if this map contains no mapping for the key.
-
setHttpRequestList
Associates the specifiedPersistedList
ofHttpRequest
with the specified key in this map. If the map previously contained a mapping for the key, the old value is replaced by the specified value.- Parameters:
key
- The key with which the specified value is to be associated.value
- The value to be associated with the specified key. The methods of this list operate on the underlying persisted data.
-
deleteHttpRequestList
Removes the mapping of the specified key to thePersistedList
ofHttpRequest
.- Parameters:
key
- The key whose mapping is to be deleted.
-
httpRequestListKeys
Retrieve all keys currently mapped forHttpRequest
Lists.- Returns:
- Set of keys.
-
getHttpResponse
HttpResponse
associated with the specified key, ornull
if this map contains no mapping for the key- Parameters:
key
- The key whose associated value is to be returned.- Returns:
- The value associated with the specified key, or
null
if this map contains no mapping for the key.
-
setHttpResponse
Associates the specifiedHttpResponse
with the specified key in this map. This is an optional operation. If the map previously contained a mapping for the key, the old value is replaced by the specified value.- Parameters:
key
- The key with which the specified value is to be associated.value
- The value to be associated with the specified key.
-
deleteHttpResponse
Removes the mapping of the specified key to theHttpResponse
.- Parameters:
key
- The key whose mapping is to be deleted.
-
httpResponseKeys
Retrieve all keys currently mapped forHttpResponse
values.- Returns:
- Set of keys.
-
getHttpResponseList
PersistedList
ofHttpResponse
associated with the specified key, ornull
if this map contains no mapping for the key.- Parameters:
key
- The key whose associated value is to be returned.- Returns:
- The value associated with the specified key, or
null
if this map contains no mapping for the key.
-
setHttpResponseList
Associates the specifiedPersistedList
ofHttpResponse
with the specified key in this map. If the map previously contained a mapping for the key, the old value is replaced by the specified value.- Parameters:
key
- The key with which the specified value is to be associated.value
- The value to be associated with the specified key. The methods of this list operate on the underlying persisted data.
-
deleteHttpResponseList
Removes the mapping of the specified key to thePersistedList
ofHttpResponse
.- Parameters:
key
- The key whose mapping is to be deleted.
-
httpResponseListKeys
Retrieve all keys currently mapped forHttpResponse
Lists.- Returns:
- Set of keys.
-
getHttpRequestResponse
HttpRequestResponse
associated with the specified key, ornull
if this map contains no mapping for the key.- Parameters:
key
- The key whose associated value is to be returned.- Returns:
- The value associated with the specified key, or
null
if this map contains no mapping for the key.
-
setHttpRequestResponse
Associates the specifiedHttpRequestResponse
with the specified key in this map. This is an optional operation. If the map previously contained a mapping for the key, the old value is replaced by the specified value.- Parameters:
key
- The key with which the specified value is to be associated.value
- The value to be associated with the specified key.
-
deleteHttpRequestResponse
Removes the mapping of the specified key to theHttpRequestResponse
.- Parameters:
key
- The key whose mapping is to be deleted.
-
httpRequestResponseKeys
Retrieve all keys currently mapped forHttpRequestResponse
values.- Returns:
- Set of keys.
-
getHttpRequestResponseList
PersistedList
ofHttpRequestResponse
associated with the specified key, ornull
if this map contains no mapping for the key.- Parameters:
key
- The key whose associated value is to be returned.- Returns:
- The value associated with the specified key, or
null
if this map contains no mapping for the key.
-
setHttpRequestResponseList
Associates the specifiedPersistedList
ofHttpRequestResponse
with the specified key in this map. If the map previously contained a mapping for the key, the old value is replaced by the specified value.- Parameters:
key
- The key with which the specified value is to be associated.value
- The value to be associated with the specified key. The methods of this list operate on the underlying persisted data.
-
deleteHttpRequestResponseList
Removes the mapping of the specified key to thePersistedList
ofHttpRequestResponse
.- Parameters:
key
- The key whose mapping is to be deleted.
-
httpRequestResponseListKeys
Retrieve all keys currently mapped forHttpRequestResponse
Lists.- Returns:
- Set of keys.
-
getBooleanList
PersistedList
ofBoolean
associated with the specified key, ornull
if this map contains no mapping for the key.- Parameters:
key
- The key whose associated value is to be returned.- Returns:
- The value to which the specified key is mapped, or
null
if this map contains no mapping for the key.
-
setBooleanList
Associates the specifiedPersistedList
ofBoolean
with the specified key in this map. If the map previously contained a mapping for the key, the old value is replaced by the specified value.- Parameters:
key
- The key with which the specified value is to be associated.value
- The value to be associated with the specified key.
-
deleteBooleanList
Removes the mapping of the specified key to thePersistedList
ofBoolean
.- Parameters:
key
- The key whose mapping is to be deleted.
-
booleanListKeys
Retrieve all keys currently mapped forBoolean
Lists.- Returns:
- Set of keys.
-
getShortList
PersistedList
ofShort
associated with the specified key, ornull
if this map contains no mapping for the key.- Parameters:
key
- The key whose associated value is to be returned.- Returns:
- The value to which the specified key is mapped, or
null
if this map contains no mapping for the key.
-
setShortList
Associates the specifiedPersistedList
ofShort
with the specified key in this map. If the map previously contained a mapping for the key, the old value is replaced by the specified value.- Parameters:
key
- The key with which the specified value is to be associated.value
- The value to be associated with the specified key.
-
deleteShortList
Removes the mapping of the specified key to thePersistedList
ofShort
.- Parameters:
key
- The key whose mapping is to be deleted.
-
shortListKeys
Retrieve all keys currently mapped forShort
Lists.- Returns:
- Set of keys.
-
getIntegerList
PersistedList
ofInteger
associated with the specified key, ornull
if this map contains no mapping for the key.- Parameters:
key
- The key whose associated value is to be returned.- Returns:
- The value to which the specified key is mapped, or
null
if this map contains no mapping for the key.
-
setIntegerList
Associates the specifiedPersistedList
ofInteger
with the specified key in this map. If the map previously contained a mapping for the key, the old value is replaced by the specified value.- Parameters:
key
- The key with which the specified value is to be associated.value
- The value to be associated with the specified key.
-
deleteIntegerList
Removes the mapping of the specified key to thePersistedList
ofInteger
.- Parameters:
key
- The key whose mapping is to be deleted.
-
integerListKeys
Retrieve all keys currently mapped forInteger
Lists.- Returns:
- Set of keys.
-
getLongList
PersistedList
ofLong
associated with the specified key, ornull
if this map contains no mapping for the key.- Parameters:
key
- The key whose associated value is to be returned.- Returns:
- The value to which the specified key is mapped, or
null
if this map contains no mapping for the key.
-
setLongList
Associates the specifiedPersistedList
ofLong
with the specified key in this map. If the map previously contained a mapping for the key, the old value is replaced by the specified value.- Parameters:
key
- The key with which the specified value is to be associated.value
- The value to be associated with the specified key.
-
deleteLongList
Removes the mapping of the specified key to thePersistedList
ofLong
.- Parameters:
key
- The key whose mapping is to be deleted.
-
longListKeys
Retrieve all keys currently mapped forLong
Lists.- Returns:
- Set of keys.
-
getStringList
PersistedList
ofString
associated with the specified key, ornull
if this map contains no mapping for the key.- Parameters:
key
- The key whose associated value is to be returned.- Returns:
- The value to which the specified key is mapped, or
null
if this map contains no mapping for the key.
-
setStringList
Associates the specifiedPersistedList
ofString
with the specified key in this map. If the map previously contained a mapping for the key, the old value is replaced by the specified value.- Parameters:
key
- The key with which the specified value is to be associated.value
- The value to be associated with the specified key.
-
deleteStringList
Removes the mapping of the specified key to thePersistedList
ofString
.- Parameters:
key
- The key whose mapping is to be deleted.
-
stringListKeys
Retrieve all keys currently mapped forString
Lists.- Returns:
- Set of keys.
-
getByteArrayList
PersistedList
ofByteArray
associated with the specified key, ornull
if this map contains no mapping for the key.- Parameters:
key
- The key whose associated value is to be returned.- Returns:
- The value associated with the specified key, or
null
if this map contains no mapping for the key.
-
setByteArrayList
Associates the specifiedPersistedList
ofByteArray
with the specified key in this map. If the map previously contained a mapping for the key, the old value is replaced by the specified value.- Parameters:
key
- The key with which the specified value is to be associated.value
- The value to be associated with the specified key. The methods of this list operate on the underlying persisted data.
-
deleteByteArrayList
Removes the mapping of the specified key to thePersistedList
ofByteArray
.- Parameters:
key
- The key whose mapping is to be deleted.
-
byteArrayListKeys
Retrieve all keys currently mapped forByteArray
Lists.- Returns:
- Set of keys.
-
persistedObject
Create a new instance ofPersistedObject
.- Returns:
- A new
PersistedObject
instance.
-