Package org.dspace.workflow
Class Task
java.lang.Object
org.dspace.workflow.Task
An association between a
curation task
and the workflow system. A single curation task may be associated with more
than one workflow, and each association may be configured differently.
A curation task can be given "powers" to affect the
progress of a workflow. For example, a curation task can cause a workflow
item to be rejected if it fails.
A curation task can be associated with "contacts"
(email addresses) to be notified when the curation task returns a given status.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddContact(@NotNull String status, @NotNull String contact) Associate a contact with a given curation status such asCurator.CURATE_ERROR.voidEmpower this attachment to affect a workflow in some way.getContacts(@NotNull String status) Get the collection of contacts for a given status such asCurator.CURATE_SUCCESS.
-
Field Details
-
name
Name of the curation task. -
powers
Effects of curation task completion on the workflow step. -
contacts
Contacts to be notified on a given completion status.
-
-
Constructor Details
-
Task
Create an instance of an association with a given curation task.- Parameters:
name- the name of a curation task to be attached to some workflow.
-
-
Method Details
-
addPower
Empower this attachment to affect a workflow in some way.- Parameters:
power- the given power. SeeXmlWorkflowCuratorServiceImpl.curate(org.dspace.curate.Curator, org.dspace.core.Context, java.lang.String). TODO should use schema-generatedenum?
-
addContact
Associate a contact with a given curation status such asCurator.CURATE_ERROR.- Parameters:
status- an exit status of the curation task. TODO should use schema-generatedenum?contact- an address to be notified of this status.
-
getContacts
Get the collection of contacts for a given status such asCurator.CURATE_SUCCESS.- Parameters:
status- the given status. TODO should use schema-generatedenum?- Returns:
- contacts associated with this status.
-