You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Migrating fixity check events for the datastreams in a Fedora 3 object could be handled by the following Riprap configuration. This approach separates the persisting of legacy events from persisting of current events. This requires two separate configurations, a "primary" one that uses the PluginFetchResourceListFromDrupal plugin, and a "secondary" one that runs independently and in a separate scheduled job. The presence of the secondary configuration does not affect the operation of the primary job.
PluginFetchResourceListFromDrupal in the primary configuration writes out a file containing resource IDs of AUDIT resources, but does not add these resources to the list of resources currently being checked. The secondary configuration registers the PluginFetchResourceListFromFile plugin to read from that file.
The secondary configuration registers a persistplugin that does nothing (let's call it a "null plugin"); its getReferenceEvent() returns null and its persistEvent() returns true. (We persist the legacy events in a postcheckplugin.)
The configuration registers a fetchdigestplugin that does nothing (another "null plugin"); its execute() function returns a placeholder string (returning false would make the CheckFixity command continue to the next fetchdigestplugin, which we don't want to do).
$this->checkFixity() will return true since the reference event is null.
At this point, the CheckFixity command has an $event, but we are not going to use it since it's not the event we want to persist. The null persist plugin's persistEvent() function returns true, so the registered PluginPostCheckMigrateFedora3AuditLog executes. This plugin:
fetches the AUDIT log listed in the resource list written by the PluginFetchResourceListFromDrupal plugin
parses out the legacy events (this code already exists)
constructs the URI for the Fedora 3 datastream identified in the legacy event
persists the event (using its own code, it does not execute a persistplugin), adding an Event Detail that the event was migrated from Fedora 3's AUDIT log. There will be no digest value.
Since we want to migrate legacy events only once, we need to make sure that the PluginPostCheckMigrateFedora3AuditLog checks for the presence of the URIs first before continuing. Also, this secondary configuration can be removed after all legacy events have been migrated.
Some tasks if we take this approach:
modify the PluginFetchResourceListFromDrupal so it writes out a file of AUDIT binary resources (the URIs for those resources end in _AUDIT.xml)
write the null plugins described above
modify existing persist plugins so that reference events must contain a non-empty digest value
come up with standard value for the Event Detail indicating the event was migrated
Migrating fixity check events for the datastreams in a Fedora 3 object could be handled by the following Riprap configuration. This approach separates the persisting of legacy events from persisting of current events. This requires two separate configurations, a "primary" one that uses the PluginFetchResourceListFromDrupal plugin, and a "secondary" one that runs independently and in a separate scheduled job. The presence of the secondary configuration does not affect the operation of the primary job.
PluginFetchResourceListFromDrupal in the primary configuration writes out a file containing resource IDs of AUDIT resources, but does not add these resources to the list of resources currently being checked. The secondary configuration registers the PluginFetchResourceListFromFile plugin to read from that file.
The secondary configuration registers a persistplugin that does nothing (let's call it a "null plugin"); its
getReferenceEvent()returns null and itspersistEvent()returns true. (We persist the legacy events in a postcheckplugin.)The configuration registers a fetchdigestplugin that does nothing (another "null plugin"); its
execute()function returns a placeholder string (returning false would make the CheckFixity command continue to the next fetchdigestplugin, which we don't want to do).$this->checkFixity()will return true since the reference event is null.At this point, the CheckFixity command has an
$event, but we are not going to use it since it's not the event we want to persist. The null persist plugin'spersistEvent()function returns true, so the registered PluginPostCheckMigrateFedora3AuditLog executes. This plugin:Since we want to migrate legacy events only once, we need to make sure that the PluginPostCheckMigrateFedora3AuditLog checks for the presence of the URIs first before continuing. Also, this secondary configuration can be removed after all legacy events have been migrated.
Some tasks if we take this approach:
_AUDIT.xml)