Wiki

Clone wiki

ieeg / SnapshotJson

Introduction

The updated portal allows the storage of arbitrary named JSON objects (ideally, not too large) with a data snapshot. A common use case is to store certain kinds of "attachments", e.g., references to documents, ZIP files, Web hyperlinks, etc.

Details

The DataSnapshotServer has two methods:

getJsonKeyValues - returns a set of key/value entities storeJsonKeyValues - stores/replaces set of key/value entities

As one might expect, each stored JsonKeyValue has a key and a value. The value is assumed to be JSON-serializable, hence it is required to implement the JsonType interface (which allows Jackson to serialize the data and attach Java class information). Note that we expressly do not perform duplicate elimination based on key, i.e., the goal is to support multisets associated with keys.

JsonKeyValues are all stored together in a CLOB, so the facility is not designed for frequent updates of individual key/values. For the latter, the SnapshotApplicationClob may be more appropriate.

During the fetch of snapshot metadata, any Key/Values that are subtyped from PresentableMetadata will be added to the snapshot contents in the MetadataBrowser.

Updated