Package org.dspace.curate
Class Curation
- All Implemented Interfaces:
Runnable
- Direct Known Subclasses:
CurationCli
CurationCli provides command-line access to Curation tools and processes.
- Author:
- richardrodgers
-
Nested Class Summary
Nested classes/interfaces inherited from class org.dspace.scripts.DSpaceRunnable
DSpaceRunnable.StepResult -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Contextprotected DSpaceObjectUtilsprotected EPersonServiceFields inherited from class org.dspace.scripts.DSpaceRunnable
commandLine, handler, helpCommandLine -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidThis method will assign the currentUser to theContextvariable which is also created in this method.protected voidThis method will return the Configuration that the implementing DSpaceRunnable usesvoidThis 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 neededvoidThis 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 variablesMethods inherited from class org.dspace.scripts.DSpaceRunnable
getEpersonIdentifier, getFileNamesFromInputStreamOptions, initialize, run, setEpersonIdentifier
-
Field Details
-
ePersonService
-
dspaceObjectUtils
-
context
-
-
Constructor Details
-
Curation
public Curation()
-
-
Method Details
-
internalRun
Description 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
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
-
assignSpecialGroupsInContext
- Throws:
SQLException
-