Files
DSpace/dspace-api/src/main/java/org/dspace/curate/CurationTask.java
Richard Rodgers 5262078026 [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
2010-10-28 00:09:31 +00:00

54 lines
1.4 KiB
Java

/*
* 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;
}