Package org.dspace.workflow
Class CurationTaskConfig
- java.lang.Object
-
- org.dspace.workflow.CurationTaskConfig
-
public class CurationTaskConfig extends Object
Represent the mapping between collection workflows and curation tasks. This mapping is configured in[DSpace]/config/workflow-curation.xml. Meant to be used as a singleton injected by a DI container such as Spring.Adapted from
org.dspace.curate.WorkflowCuratorServiceImpl.- Author:
- mwood
-
-
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_TASKSET_NAMEName of the TaskSet that matches an unconfiguredTaskSetname.
-
Constructor Summary
Constructors Constructor Description CurationTaskConfig(InputStream configurationDocument)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontainsKey(@NotNull String name)Is this task set name defined?@NotNull TaskSetfindTaskSet(@NotNull String setName)Find a TaskSet by name.
-
-
-
Field Detail
-
DEFAULT_TASKSET_NAME
public static final String DEFAULT_TASKSET_NAME
Name of the TaskSet that matches an unconfiguredTaskSetname.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CurationTaskConfig
public CurationTaskConfig(InputStream configurationDocument) throws javax.xml.bind.JAXBException, SAXException, IOException
- Parameters:
configurationDocument- the external representation of the workflow curation configuration.- Throws:
IOException- if the configuration file cannot be opened.javax.xml.bind.JAXBException- passed through: configuration syntax or semantic error.SAXException- passed through: configuration lexical error.
-
-
Method Detail
-
findTaskSet
@NotNull public @NotNull TaskSet findTaskSet(@NotNull @NotNull String setName)
Find a TaskSet by name.- Parameters:
setName- name of the sought TaskSet: collection handle or "default".- Returns:
- the named TaskSet, or the default TaskSet if not found, or an empty TaskSet (zero steps) if there is no default either.
-
containsKey
public boolean containsKey(@NotNull @NotNull String name)Is this task set name defined?- Parameters:
name- name of the task set sought.- Returns:
- true if a set by that name is known.
-
-