public abstract class ResourceUtil
extends java.lang.Object
Constructor and Description |
---|
ResourceUtil() |
Modifier and Type | Method and Description |
---|---|
static com.fasterxml.jackson.databind.node.ObjectNode |
mergeExistingArrayProperties(com.fasterxml.jackson.databind.node.ObjectNode propertiesToSave,
com.fasterxml.jackson.databind.node.ObjectNode existingResourceProperties)
Given a set of properties to save, this will update each array property in that set with the items from the
same array in the given existingResourceProperties object, if the array property exists in that object.
|
public static com.fasterxml.jackson.databind.node.ObjectNode mergeExistingArrayProperties(com.fasterxml.jackson.databind.node.ObjectNode propertiesToSave, com.fasterxml.jackson.databind.node.ObjectNode existingResourceProperties)
The intent behind calling this method is typically to not lose any items in an array property of the existing resource. That's because the Manage API will always overwrite array properties with the array that is sent to it. Thus, if you know that the array you're sending doesn't have all the existing items and you don't want to lose any of those items, call this method.
propertiesToSave
- a set of resource properties that will be persisted via the Manage APIexistingResourceProperties
- the existing properties of the resource that will be updated