Interface ModifierMethod
- All Known Implementing Classes:
AddModifierMethod
,AnagramModifierMethod
,AppendModifierMethod
,DeleteModifierMethod
,DivideModifierMethod
,HashModifierMethod
,MultiplyModifierMethod
,PasswordModifierMethod
,PrimitiveModifierMethod
,ReplaceModifierMethod
,ReplaceSubStringModifierMethod
,RoundModifierMethod
,ShortenInitialModifierMethod
,SignModifierMethod
,SubStringModifierMethod
public interface ModifierMethod
Base Interface for all Modifiers.
A Modifiers should have a name, that can be used in policies
getDisplayName()
. The Method
doModification(DocumentContext, String, ParameterList)
is used for
modification of complex objects that are serialized to a JSON Structure.
doModification(Object, ParameterList)
should be overriden if the
Modifiers also supports modification of primitive values including wrapper
Types as well as String and Date.-
Method Summary
Modifier and TypeMethodDescriptioncom.jayway.jsonpath.DocumentContext
doModification
(com.jayway.jsonpath.DocumentContext documentContext, String expression, ParameterList modifierMethodParameterList) Modification for Complex Objects that are serialized usingJsonPath
.doModification
(Object currentObject, ParameterList modifierMethodParameterList) This method to be overridden when modifier wants to handle primitive type like Integer(int), Float(float), Boolean(boolean), Long(long), Short(short), Byte(byte) and Double(double) and Stringboolean
-
Method Details
-
doModification
com.jayway.jsonpath.DocumentContext doModification(com.jayway.jsonpath.DocumentContext documentContext, String expression, ParameterList modifierMethodParameterList) Modification for Complex Objects that are serialized usingJsonPath
.- Parameters:
documentContext
- Serialized Object Structure withJsonPath
expression
-JsonPath
Expression to adress a specific element/attribute in the json.modifierMethodParameterList
- Values used for modification.- Returns:
DocumentContext
-
doModification
This method to be overridden when modifier wants to handle primitive type like Integer(int), Float(float), Boolean(boolean), Long(long), Short(short), Byte(byte) and Double(double) and String- Parameters:
currentObject
- The primitive value for modification.modifierMethodParameterList
- List of parameters that should be used for modification- Returns:
- This default implementation is returning the object without modification.
-
getDisplayName
String getDisplayName()- Returns:
- Display name
-
nameIsValid
boolean nameIsValid()
-