[DS-2058] More documentation, small cleanups.

This commit is contained in:
Mark H. Wood
2021-05-15 07:19:29 -04:00
parent 1585bcb268
commit 80158fc875
5 changed files with 23 additions and 4 deletions

View File

@@ -53,10 +53,10 @@ public abstract class DSpaceObject implements Serializable, ReloadableEntity<jav
private List<MetadataValue> metadata = new ArrayList<>();
@OneToMany(fetch = FetchType.LAZY, mappedBy = "dso")
// Order by is here to ensure that the oldest handle is retrieved first,
// multiple handles are assigned to the latest version of an item the original handle will have the lowest
// identifier
// This handle is the preferred handle.
// OrderBy is here to ensure that the oldest handle is retrieved first.
// Multiple handles are assigned to the latest version of an item.
// The original handle will have the lowest identifier. This handle is the
// preferred handle.
@OrderBy("id ASC")
private List<Handle> handles = new ArrayList<>();
@@ -122,6 +122,7 @@ public abstract class DSpaceObject implements Serializable, ReloadableEntity<jav
*
* @return internal ID of object
*/
@Override
public UUID getID() {
return id;
}
@@ -142,6 +143,10 @@ public abstract class DSpaceObject implements Serializable, ReloadableEntity<jav
this.handles = handle;
}
/**
* Append to this object's list of Handles.
* @param handle the new Handle to be added.
*/
public void addHandle(Handle handle) {
this.handles.add(handle);
}

View File

@@ -38,6 +38,7 @@ import org.xml.sax.SAXException;
* @author mwood
*/
public class CurationTaskConfig {
/** Name of the TaskSet that matches an unconfigured {@link TaskSet} name. */
public static final String DEFAULT_TASKSET_NAME = "default";
private final Map<String, TaskSet> collectionTasksetMap;

View File

@@ -15,8 +15,13 @@ import javax.validation.constraints.NotNull;
* Linkage between a workflow step and some {@link org.dspace.curate.CurationTask}s.
*/
public class FlowStep {
/** Name of this workflow step. */
public final String step;
/** Queue on which to run curation tasks, or {@code null} for immediate run. */
public final String queue;
/** Curation tasks to be run in this workflow step. */
public final List<Task> tasks = new ArrayList<>();
/**

View File

@@ -26,8 +26,13 @@ import javax.validation.constraints.NotNull;
* (email addresses) to be notified when the curation task returns a given status.
*/
public class Task {
/** Name of the curation task. */
public final String name;
/** Effects of curation task completion on the workflow step. */
public final List<String> powers = new ArrayList<>();
/** Contacts to be notified on a given completion status. */
public final Map<String, List<String>> contacts = new HashMap<>();
/**

View File

@@ -15,7 +15,10 @@ import javax.validation.constraints.NotNull;
* attached to a workflow.
*/
public class TaskSet {
/** Name of this TaskSet. */
public final String name;
/** The {@link FlowStep}s assigned to this TaskSet. */
public final List<FlowStep> steps;
/**