Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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.

...

Code overview

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.

Data model

A ContentObjectModification is used to encapsulate a set of ContentItemModifications

...

Each ContentItemModification represents:

  • The identifier of the datastream (the REST API endpoint of getDatastreamDissemination)
  • A URL for the modified content location (the datastream version) - present for Add and Update operations, not present for Delete operations and state changes
  • The internet media type (MIME type) of the content - present for Add and Update operations, not present for Delete operations and state changes
  • The type of modification (Add, Update, Delete) - not present for state-only changes
  • Wiki Markup
    The state change of the datastream, specifying the previous and new states \[1\]
    • For Add operations the previous state is not specified

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:

  • net.acuityunlimited.gen.messaging.ContentObjectModification
  • net.acuityunlimited.gen.messaging.ContentItemModification

ContentObjectModification implements Iterable\<ContentItemModification\>

AtomPub serialisation

Example messages

Code overview