Package org.zaproxy.clientapi.core
Class ApiResponseSet
- java.lang.Object
-
- org.zaproxy.clientapi.core.ApiResponse
-
- org.zaproxy.clientapi.core.ApiResponseSet
-
public class ApiResponseSet extends ApiResponse
-
-
Constructor Summary
Constructors Constructor Description ApiResponseSet(java.lang.String name, java.lang.String[] attributes)Deprecated.(1.1.0) Unused, there's no replacement.ApiResponseSet(java.lang.String name, java.util.Map<java.lang.String,ApiResponse> values)ApiResponseSet(org.w3c.dom.Node node)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.StringgetAttribute(java.lang.String key)Deprecated.(1.1.0) UsegetStringValue(String)orgetValue(String)instead.java.lang.String[]getAttributes()Deprecated.(1.1.0) Unused, there's no replacement.java.util.Set<java.lang.String>getKeys()Gets the keys of the values.java.lang.StringgetStringValue(java.lang.String key)Gets the value for the givenkeyasString.ApiResponsegetValue(java.lang.String key)Gets the value for the givenkey.java.util.Collection<ApiResponse>getValues()Gets the values.java.util.Map<java.lang.String,ApiResponse>getValuesMap()Gets aMapwith the keys and values.java.lang.StringtoString(int indent)-
Methods inherited from class org.zaproxy.clientapi.core.ApiResponse
getName, setName
-
-
-
-
Constructor Detail
-
ApiResponseSet
@Deprecated public ApiResponseSet(java.lang.String name, java.lang.String[] attributes)Deprecated.(1.1.0) Unused, there's no replacement.Constructs anApiResponseSetwith the given name and attributes.- Parameters:
name- the name of the API responseattributes- the attributes
-
ApiResponseSet
public ApiResponseSet(java.lang.String name, java.util.Map<java.lang.String,ApiResponse> values)
-
ApiResponseSet
public ApiResponseSet(org.w3c.dom.Node node) throws ClientApiException- Throws:
ClientApiException
-
-
Method Detail
-
getAttributes
@Deprecated public java.lang.String[] getAttributes()
Deprecated.(1.1.0) Unused, there's no replacement.Gets the attributes.- Returns:
- the attributes, might be
null. - See Also:
getValues()
-
getAttribute
@Deprecated public java.lang.String getAttribute(java.lang.String key)
Deprecated.(1.1.0) UsegetStringValue(String)orgetValue(String)instead.Gets the value for the givenkey.- Parameters:
key- the key of the value- Returns:
- the value, or
nullif no value exists for the givenkey.
-
getValue
public ApiResponse getValue(java.lang.String key)
Gets the value for the givenkey.- Parameters:
key- the key of the value- Returns:
- the value, or
nullif no value exists for the givenkey. - Since:
- 1.1.0
- See Also:
getKeys(),getStringValue(String)
-
getStringValue
public java.lang.String getStringValue(java.lang.String key)
Gets the value for the givenkeyasString.For
ApiResponseElements it returnsits value, for otherApiResponsetypes it returns the conversion toString.- Parameters:
key- the key of the value- Returns:
- the value, or
nullif no value exists for the givenkey. - Since:
- 1.1.0
- See Also:
getKeys(),getValue(String)
-
getValuesMap
public java.util.Map<java.lang.String,ApiResponse> getValuesMap()
Gets aMapwith the keys and values.The returned
Mapis unmodifiable, any attempt to modify it will result in anUnsupportedOperationException.- Returns:
- the map with the keys/values, never
null. - Since:
- 1.1.0
-
getKeys
public java.util.Set<java.lang.String> getKeys()
Gets the keys of the values.The returned
Setis unmodifiable, any attempt to modify it will result in anUnsupportedOperationException.- Returns:
- the keys, never
null. - Since:
- 1.1.0
- See Also:
getValue(String),getStringValue(String),getValues(),getValuesMap()
-
getValues
public java.util.Collection<ApiResponse> getValues()
Gets the values.The returned
Collectionis unmodifiable, any attempt to modify it will result in anUnsupportedOperationException.- Returns:
- the values, never
null. - Since:
- 1.1.0
- See Also:
getValue(String),getStringValue(String)
-
toString
public java.lang.String toString(int indent)
- Specified by:
toStringin classApiResponse
-
-