Class Harvest

All Implemented Interfaces:
Runnable
Direct Known Subclasses:
HarvestCli

public class Harvest extends DSpaceRunnable<HarvestScriptConfiguration>
Test class for harvested collections.
Author:
Alexey Maslov
  • Field Details

  • Constructor Details

    • Harvest

      public Harvest()
  • Method Details

    • getScriptConfiguration

      public HarvestScriptConfiguration getScriptConfiguration()
      Description copied from class: DSpaceRunnable
      This method will return the Configuration that the implementing DSpaceRunnable uses
      Specified by:
      getScriptConfiguration in class DSpaceRunnable<HarvestScriptConfiguration>
      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<HarvestScriptConfiguration>
      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
    • 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<HarvestScriptConfiguration>
      Throws:
      Exception - If something goes wrong