Package org.dspace.ctask.general
Class RegisterDOI
- java.lang.Object
-
- org.dspace.curate.AbstractCurationTask
-
- org.dspace.ctask.general.RegisterDOI
-
- All Implemented Interfaces:
CurationTask
public class RegisterDOI extends AbstractCurationTask
This curation task will register a DOI for an item, optionally ignoring any logical filtering applied to normal identifier registration and DOI service operation.- Author:
- Kim Shepherd
-
-
Field Summary
-
Fields inherited from class org.dspace.curate.AbstractCurationTask
communityService, configurationService, curator, handleService, itemService, taskId
-
-
Constructor Summary
Constructors Constructor Description RegisterDOI()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinit(Curator curator, String taskId)Initialise the curation task and read configuration, instantiate the DOI providerintperform(DSpaceObject dso)Override the abstract 'perform' method to either distribute, or perform single-item depending on configuration.protected voidperformItem(Item item)This is called when the task is distributed (ie.-
Methods inherited from class org.dspace.curate.AbstractCurationTask
dereference, distribute, perform, performObject, report, setResult, taskArrayProperty, taskBooleanProperty, taskIntProperty, taskLongProperty, taskProperty
-
-
-
-
Method Detail
-
init
public void init(Curator curator, String taskId) throws IOException
Initialise the curation task and read configuration, instantiate the DOI provider- Specified by:
initin interfaceCurationTask- Overrides:
initin classAbstractCurationTask- Parameters:
curator- the Curator controlling this tasktaskId- identifier task should use in invoking services- Throws:
IOException- if error
-
perform
public int perform(DSpaceObject dso) throws IOException
Override the abstract 'perform' method to either distribute, or perform single-item depending on configuration. By default, the task is *not* distributed, since that could be unsafe and the original purpose of this task is to essentially implement a "Register DOI" button on the Edit Item page.- Specified by:
performin interfaceCurationTask- Specified by:
performin classAbstractCurationTask- Parameters:
dso- DSpaceObject for which to register a DOI (must be item)- Returns:
- status indicator
- Throws:
IOException
-
performItem
protected void performItem(Item item)
This is called when the task is distributed (ie. called on a set of items or over a whole structure)- Overrides:
performItemin classAbstractCurationTask- Parameters:
item- the DSpace Item
-
-