mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-15 14:03:17 +00:00
[DS-728] Add core curation code & workflow support
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@5674 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
53
dspace-api/src/main/java/org/dspace/curate/CurationTask.java
Normal file
53
dspace-api/src/main/java/org/dspace/curate/CurationTask.java
Normal file
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* The contents of this file are subject to the license and copyright
|
||||
* detailed in the LICENSE and NOTICE files at the root of the source
|
||||
* tree and available online at
|
||||
*
|
||||
* http://dspace.org/license/
|
||||
*/
|
||||
|
||||
package org.dspace.curate;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import org.dspace.content.DSpaceObject;
|
||||
import org.dspace.core.Context;
|
||||
|
||||
/**
|
||||
* CurationTask describes a rather generic ability to perform an operation
|
||||
* upon a DSpace object.
|
||||
*
|
||||
* @author richardrodgers
|
||||
*/
|
||||
public interface CurationTask
|
||||
{
|
||||
/**
|
||||
* Initialize task - parameters inform the task of it's invoking curator.
|
||||
* Since the curator can provide services to the task, this represents
|
||||
* curation DI.
|
||||
*
|
||||
* @param curator the Curator controlling this task
|
||||
* @param taskId identifier task should use in invoking services
|
||||
* @throws IOException
|
||||
*/
|
||||
void init(Curator curator, String taskId) throws IOException;
|
||||
|
||||
/**
|
||||
* Perform the curation task upon passed DSO
|
||||
*
|
||||
* @param dso the DSpace object
|
||||
* @return status code
|
||||
* @throws IOException
|
||||
*/
|
||||
int perform(DSpaceObject dso) throws IOException;
|
||||
|
||||
/**
|
||||
* Perform the curation task for passed id
|
||||
*
|
||||
* @param ctx DSpace context object
|
||||
* @param id persistent ID for DSpace object
|
||||
* @return status code
|
||||
* @throws Exception
|
||||
*/
|
||||
int perform(Context ctx, String id) throws IOException;
|
||||
}
|
Reference in New Issue
Block a user