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 policiesgetDisplayName()
. The MethoddoModification(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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description com.jayway.jsonpath.DocumentContext
doModification(com.jayway.jsonpath.DocumentContext documentContext, String expression, ParameterList modifierMethodParameterList)
Modification for Complex Objects that are serialized usingJsonPath
.Object
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 StringString
getDisplayName()
boolean
nameIsValid()
-
-
-
Method Detail
-
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
Object 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 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()
-
-