Class 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 Details

  • Constructor Details

    • Curation

      public Curation()
  • Method Details

    • internalRun

      public void internalRun() throws Exception
      Description copied from class: DSpaceRunnable
      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 needed
      Specified by:
      internalRun in class DSpaceRunnable<CurationScriptConfiguration>
      Throws:
      Exception - If something goes wrong
    • printHelp

      public void printHelp()
      Description copied from class: DSpaceRunnable
      This method will call upon the DSpaceRunnableHandler.printHelp(Options, String) method with the script's options and name
      Overrides:
      printHelp in class DSpaceRunnable<CurationScriptConfiguration>
    • getScriptConfiguration

      public CurationScriptConfiguration getScriptConfiguration()
      Description copied from class: DSpaceRunnable
      This method will return the Configuration that the implementing DSpaceRunnable uses
      Specified by:
      getScriptConfiguration in class DSpaceRunnable<CurationScriptConfiguration>
      Returns:
      The ScriptConfiguration that this implementing DspaceRunnable uses
    • setup

      public void setup() throws org.apache.commons.cli.ParseException
      Description copied from class: DSpaceRunnable
      This 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:
      setup in class DSpaceRunnable<CurationScriptConfiguration>
      Throws:
      org.apache.commons.cli.ParseException - If something goes wrong
    • assignCurrentUserInContext

      protected void assignCurrentUserInContext() throws org.apache.commons.cli.ParseException
      This method will assign the currentUser to the Context variable 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 the EPerson associated with it and this EPerson will be set as the currentUser of the created Context
      Throws:
      org.apache.commons.cli.ParseException - If something went wrong with the retrieval of the EPerson Identifier
    • assignSpecialGroupsInContext

      protected void assignSpecialGroupsInContext() throws SQLException
      Throws:
      SQLException