Package org.dspace.workflow
Class Task
- java.lang.Object
-
- org.dspace.workflow.Task
-
public class Task extends Object
An association between acuration taskand 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.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddContact(@NotNull String status, @NotNull String contact)Associate a contact with a given curation status such asCurator.CURATE_ERROR.voidaddPower(@NotNull String power)Empower this attachment to affect a workflow in some way.@NotNull List<String>getContacts(@NotNull String status)Get the collection of contacts for a given status such asCurator.CURATE_SUCCESS.
-
-
-
Constructor Detail
-
Task
public Task(@NotNull @NotNull String name)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 Detail
-
addPower
public void addPower(@NotNull @NotNull String power)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
public void addContact(@NotNull @NotNull String status, @NotNull @NotNull String contact)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
@NotNull public @NotNull List<String> getContacts(@NotNull @NotNull String status)
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.
-
-