Class TestOperation
- java.lang.Object
-
- com.github.fge.jsonpatch.operation.PathValueOperation
-
- com.github.fge.jsonpatch.operation.TestOperation
-
- de.cismet.cids.jsonpatch.operation.cidsbean.TestOperation
-
- All Implemented Interfaces:
com.fasterxml.jackson.databind.JsonSerializable,com.github.fge.jsonpatch.operation.JsonPatchOperation,CidsBeanPatchOperation
public class TestOperation extends com.github.fge.jsonpatch.operation.TestOperation implements CidsBeanPatchOperation
JSON Patchtestoperation.The two arguments for this operation are the pointer containing the value to test (
path) and the value to test equality against (value).It is an error if no value exists at the given path.
Also note that equality as defined by JSON Patch is exactly the same as it is defined by JSON Schema itself. As such, this operation reuses
JsonNumEqualsfor testing equality.- Version:
- $Revision$, $Date$
-
-
Field Summary
Fields Modifier and Type Field Description protected static ResourceBundleRESOURCE_BUNDLE
-
Constructor Summary
Constructors Constructor Description TestOperation(com.github.fge.jackson.jsonpointer.JsonPointer path, com.fasterxml.jackson.databind.JsonNode value)Creates a new TestOperation object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description de.cismet.cids.dynamics.CidsBeanapply(de.cismet.cids.dynamics.CidsBean cidsBean)Apply this operation to a JSON value.-
Methods inherited from class com.github.fge.jsonpatch.operation.PathValueOperation
serialize, serializeWithType, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
RESOURCE_BUNDLE
protected static final ResourceBundle RESOURCE_BUNDLE
-
-
Method Detail
-
apply
public de.cismet.cids.dynamics.CidsBean apply(de.cismet.cids.dynamics.CidsBean cidsBean) throws com.github.fge.jsonpatch.JsonPatchExceptionDescription copied from interface:CidsBeanPatchOperationApply this operation to a JSON value.- Specified by:
applyin interfaceCidsBeanPatchOperation- Parameters:
cidsBean- the value to patch- Returns:
- the patched value
- Throws:
com.github.fge.jsonpatch.JsonPatchException- com.github.fge.jsonpatch.JsonPatchException operation failed to apply to this value
-
-