Package org.dspace.curate
Class Curation
- java.lang.Object
-
- org.dspace.scripts.DSpaceRunnable<CurationScriptConfiguration>
-
- org.dspace.curate.Curation
-
- All Implemented Interfaces:
Runnable
- Direct Known Subclasses:
CurationCli
public class Curation extends DSpaceRunnable<CurationScriptConfiguration>
CurationCli provides command-line access to Curation tools and processes.- Author:
- richardrodgers
-
-
Field Summary
Fields Modifier and Type Field Description protected Contextcontextprotected EPersonServiceePersonService-
Fields inherited from class org.dspace.scripts.DSpaceRunnable
commandLine, handler
-
-
Constructor Summary
Constructors Constructor Description Curation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidassignCurrentUserInContext()This method will assign the currentUser to theContextvariable which is also created in this method.CurationScriptConfigurationgetScriptConfiguration()This method will return the Configuration that the implementing DSpaceRunnable usesvoidinternalRun()This method has to be included in every script and this will be the main execution block for the script that'll contain all the logic neededvoidprintHelp()This method will call upon theDSpaceRunnableHandler.printHelp(Options, String)method with the script's options and namevoidsetup()This method has to be included in every script and handles the setup of the script by parsing the CommandLine and setting the variables-
Methods inherited from class org.dspace.scripts.DSpaceRunnable
getEpersonIdentifier, getFileNamesFromInputStreamOptions, initialize, run, setEpersonIdentifier
-
-
-
-
Field Detail
-
ePersonService
protected EPersonService ePersonService
-
context
protected Context context
-
-
Method Detail
-
internalRun
public void internalRun() throws ExceptionDescription copied from class:DSpaceRunnableThis method has to be included in every script and this will be the main execution block for the script that'll contain all the logic needed- Specified by:
internalRunin classDSpaceRunnable<CurationScriptConfiguration>- Throws:
Exception- If something goes wrong
-
printHelp
public void printHelp()
Description copied from class:DSpaceRunnableThis method will call upon theDSpaceRunnableHandler.printHelp(Options, String)method with the script's options and name- Overrides:
printHelpin classDSpaceRunnable<CurationScriptConfiguration>
-
getScriptConfiguration
public CurationScriptConfiguration getScriptConfiguration()
Description copied from class:DSpaceRunnableThis method will return the Configuration that the implementing DSpaceRunnable uses- Specified by:
getScriptConfigurationin classDSpaceRunnable<CurationScriptConfiguration>- Returns:
- The
ScriptConfigurationthat this implementing DspaceRunnable uses
-
setup
public void setup() throws org.apache.commons.cli.ParseExceptionDescription copied from class:DSpaceRunnableThis method has to be included in every script and handles the setup of the script by parsing the CommandLine and setting the variables- Specified by:
setupin classDSpaceRunnable<CurationScriptConfiguration>- Throws:
org.apache.commons.cli.ParseException- If something goes wrong
-
assignCurrentUserInContext
protected void assignCurrentUserInContext() throws org.apache.commons.cli.ParseExceptionThis method will assign the currentUser to theContextvariable which is also created in this method. The instance of the method in this class will fetch the EPersonIdentifier from this class, this identifier was given to this class upon instantiation, it'll then be used to find theEPersonassociated with it and thisEPersonwill be set as the currentUser of the createdContext- Throws:
org.apache.commons.cli.ParseException- If something went wrong with the retrieval of the EPerson Identifier
-
-