Class AddOperation
- java.lang.Object
-
- com.github.fge.jsonpatch.operation.PathValueOperation
-
- com.github.fge.jsonpatch.operation.AddOperation
-
- de.cismet.cids.jsonpatch.operation.cidsbean.AddOperation
-
- All Implemented Interfaces:
com.fasterxml.jackson.databind.JsonSerializable,com.github.fge.jsonpatch.operation.JsonPatchOperation,CidsBeanPatchOperation
public class AddOperation extends com.github.fge.jsonpatch.operation.AddOperation implements CidsBeanPatchOperation
DOCUMENT ME!- Version:
- $Revision$, $Date$
-
-
Field Summary
Fields Modifier and Type Field Description protected com.github.fge.jsonpatch.operation.ReplaceOperationjsonPatchReplaceOperationprotected static org.apache.log4j.LoggerLOGGERprotected booleanoverwriteprotected static ResourceBundleRESOURCE_BUNDLEprotected static CidsBeanPatchUtilsUTILS
-
Constructor Summary
Constructors Modifier Constructor Description AddOperation(com.github.fge.jackson.jsonpointer.JsonPointer path, com.fasterxml.jackson.databind.JsonNode value)Creates a new AddOperation valueObject.protectedAddOperation(com.github.fge.jackson.jsonpointer.JsonPointer path, com.fasterxml.jackson.databind.JsonNode value, boolean overwrite)Creates a new AddOperation valueObject.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddToArray(List parentList)DOCUMENT ME!protected voidaddToObject(de.cismet.cids.dynamics.CidsBean parentBean)DOCUMENT ME!com.fasterxml.jackson.databind.JsonNodeapply(com.fasterxml.jackson.databind.JsonNode node)de.cismet.cids.dynamics.CidsBeanapply(de.cismet.cids.dynamics.CidsBean cidsBean)Apply this operation to a JSON value.static <T> TgetLast(Iterable<T> iterable)DOCUMENT ME!-
Methods inherited from class com.github.fge.jsonpatch.operation.AddOperation
addToArray, addToObject
-
Methods inherited from class com.github.fge.jsonpatch.operation.PathValueOperation
serialize, serializeWithType, toString
-
-
-
-
Field Detail
-
LOGGER
protected static final org.apache.log4j.Logger LOGGER
-
UTILS
protected static final CidsBeanPatchUtils UTILS
-
RESOURCE_BUNDLE
protected static final ResourceBundle RESOURCE_BUNDLE
-
jsonPatchReplaceOperation
protected final com.github.fge.jsonpatch.operation.ReplaceOperation jsonPatchReplaceOperation
-
overwrite
protected final boolean overwrite
-
-
Constructor Detail
-
AddOperation
public AddOperation(com.github.fge.jackson.jsonpointer.JsonPointer path, com.fasterxml.jackson.databind.JsonNode value)Creates a new AddOperation valueObject.- Parameters:
path- DOCUMENT ME!value- DOCUMENT ME!
-
AddOperation
protected AddOperation(com.github.fge.jackson.jsonpointer.JsonPointer path, com.fasterxml.jackson.databind.JsonNode value, boolean overwrite)Creates a new AddOperation valueObject.- Parameters:
path- DOCUMENT ME!value- DOCUMENT ME!overwrite- DOCUMENT ME!
-
-
Method Detail
-
apply
public com.fasterxml.jackson.databind.JsonNode apply(com.fasterxml.jackson.databind.JsonNode node) throws com.github.fge.jsonpatch.JsonPatchException- Specified by:
applyin interfacecom.github.fge.jsonpatch.operation.JsonPatchOperation- Overrides:
applyin classcom.github.fge.jsonpatch.operation.AddOperation- Throws:
com.github.fge.jsonpatch.JsonPatchException
-
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
-
addToArray
protected void addToArray(List parentList) throws com.github.fge.jsonpatch.JsonPatchException
DOCUMENT ME!- Parameters:
parentList- DOCUMENT ME!- Throws:
com.github.fge.jsonpatch.JsonPatchException- DOCUMENT ME!
-
getLast
public static <T> T getLast(Iterable<T> iterable)
DOCUMENT ME!- Type Parameters:
T- DOCUMENT ME!- Parameters:
iterable- DOCUMENT ME!- Returns:
- DOCUMENT ME!
- Throws:
NoSuchElementException- DOCUMENT ME!
-
addToObject
protected void addToObject(de.cismet.cids.dynamics.CidsBean parentBean) throws com.github.fge.jsonpatch.JsonPatchExceptionDOCUMENT ME!- Parameters:
parentBean- DOCUMENT ME!- Throws:
com.github.fge.jsonpatch.JsonPatchException- DOCUMENT ME!
-
-