Class DeleteModifierMethod
- java.lang.Object
-
- de.fraunhofer.iese.mydata.pep.modifiers.basic.DeleteModifierMethod
-
- All Implemented Interfaces:
ModifierMethod
public class DeleteModifierMethod extends Object implements ModifierMethod
This a default Modifiers method with Pep sdk which deletes attribute where event parameter is either a Json Object or string (primitive type)
-
-
Constructor Summary
Constructors Constructor Description DeleteModifierMethod()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.jayway.jsonpath.DocumentContext
delete(com.jayway.jsonpath.DocumentContext documentContext, String expression)
com.jayway.jsonpath.DocumentContext
doModification(com.jayway.jsonpath.DocumentContext documentContext, String expression, de.fraunhofer.iese.mydata.policy.parameter.ParameterList modifierMethodParameterList)
Modification for Complex Objects that are serialized usingJsonPath
.Object
doModification(Object currentObject, de.fraunhofer.iese.mydata.policy.parameter.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
public com.jayway.jsonpath.DocumentContext doModification(com.jayway.jsonpath.DocumentContext documentContext, String expression, de.fraunhofer.iese.mydata.policy.parameter.ParameterList modifierMethodParameterList)
Description copied from interface:ModifierMethod
Modification for Complex Objects that are serialized usingJsonPath
.- Specified by:
doModification
in interfaceModifierMethod
- 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
-
delete
public com.jayway.jsonpath.DocumentContext delete(com.jayway.jsonpath.DocumentContext documentContext, String expression)
-
getDisplayName
public String getDisplayName()
- Specified by:
getDisplayName
in interfaceModifierMethod
- Returns:
- Display name
-
doModification
public Object doModification(Object currentObject, de.fraunhofer.iese.mydata.policy.parameter.ParameterList modifierMethodParameterList)
Description copied from interface:ModifierMethod
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- Specified by:
doModification
in interfaceModifierMethod
- 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.
-
nameIsValid
public boolean nameIsValid()
- Specified by:
nameIsValid
in interfaceModifierMethod
-
-