...
Consumers of messages can make use of the following classes:
net.acuityunlimited.fedora.messaging.AtomContentChangeMessage
which can be used to deserialize the AtomPub message to net.acuityunlimited.gen.messaging.ContentObjectModification
.
...
This is a module that utilises Fedora's decorator pattern, in the same way as the current JMS messaging module. It can either be used alongside the existing messaging plug-in, or as an alternative to it.
API-M methods are handed off to an implementation of org.fcrepo.server.management.Management
which constructs the appropriate message, and then passes the method down the decorator chain.
...
For example, for an ingest operation, it represents a set of Add operations for each datastream created on ingest; for a modifyDatastream operation it represents an Update for the datastream and/or a state change; depending on if the API-M method parameters include updated content.
Messages are only dispatched for modifications to the latest versions of datastreams; it is assumed that consumers are only interested in the current, and not historic, versions of content.
A ContentObjectModification is used to encapsulate a set of ContentItemModifications
...
Each ContentItemModification represents:
Wiki Markup |
---|
The state change of the datastream, specifying the previous and new states \[1\] |
Wiki Markup |
---|
\[1\] So the consumer of the messages doesn't have to track the state of individual items but can for instance remove an item from an index if the state has changed from Active to Deleted or Inactive, but can ignore a state change from Inactive to Deleted (but see Issues on modelling state) |
The above are represented as:
ContentObjectModification
implements Iterable\<ContentItemModification\>