Versions Compared

Key

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

...

A task can be arbitrary code, but the class implementing it must have 2 properties:

First, it must provide a no-arg constructor, so it can be loaded by the PluginManager.
Thus, all tasks are 'named' plugins, meaning that each must be configured in dspace.cfg as:

...

The 'plugin name' (audit, estimate, etc) is called the task name, and is used instead of the qualified class name
wherever it is needed (on the cmd line, etc) - the CS always dereferences it.

...

Second, it must implement the interface 'org.dspace.curate.CurationTask'

The CurationTask interface is almost a 'tagging' interface, and only requires a few very high-level methods be implemented. The most significant is:

...

Tasks are invoked using CS framework classes that manage a few details (to be described below), and this invocation can occur wherever needed, but CS offers great versatility 'out of the box':

On the command line

A simple tool 'CurationCli' provides access to CS via command line. For example, to perform a virus check on collection '4':

...

As with other command-line tools, these invocations could be placed in a cron table and run on a fixed schedule, or
run on demand by an administrator.

In the admin UI

In the XMLUI, there is a 'Curate' tab (appearing within the 'Edit Community/Collection/Item') that exposes a drop-down list
of configured tasks, with a button to 'perform' the task, or queue it for later operation (see section III below). You may
filter out some of the defined tasks (not appropriate for UI use), by means of a configuration property.

In workflow

CS provides the ability to attach any number of tasks to standard DSpace workflows. Using a configuration file
(workflow-curation.xml), you can declaratively (without coding) wire tasks to any step in a workflow. An example:

{{<taskset name="cautious">
<flowstep name="step1">
<task name="vscan">
<workflow>reject</workflow>
<notify on="fail">$flowgroup</notify>
<notify on="fail">$colladmin</notify>
<notify on="error">$siteadmin</notify>
</task>
</flowstep>
</taskset>
}}

This markup would cause the virus scan to occur during step one of workflow, and automatically reject any
submissions with infected files. It would further notify (via email) both the reviewers (step 1 group), and the
collection administrators, if either of these are defined. If it could not perform the scan, the site administrator
would be notified.

Like configurable submission, you can assign these task rules per collection, as well as having a default for
any collection.

In arbitrary user code

If these pre-defined ways are not sufficient, you can of course manage curation directly in your code. You would use the CS helper classes. For example:

...