Class MoveToTrashSingleAIP

  • All Implemented Interfaces:
    org.dspace.curate.CurationTask

    @Distributive
    public class MoveToTrashSingleAIP
    extends org.dspace.curate.AbstractCurationTask
    MoveToTrashSingleAIP task moves a single AIP from one group (folder) in external storage to another group (folder). Currently it always moves content from the 'group.aip.name' store to the 'group.delete.name' store, essentially moving the content into a "trash" folder.

    This task is primarily used by the ReplicateConsumer to move the AIP for a deleted DSpace Object off to a "trash" folder / temporary location. This allows the AIP to remain in external storage for a period, just in case the deleted object needs to be restored to DSpace.

    This task only moves a single AIP at at time (it inhibits iteration when invoked on a container object).

    Author:
    tdonohue
    • Field Summary

      • Fields inherited from class org.dspace.curate.AbstractCurationTask

        communityService, configurationService, curator, handleService, itemService, taskId
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void init​(org.dspace.curate.Curator curator, String taskId)  
      int perform​(org.dspace.content.DSpaceObject dso)
      Perform 'Move To Trash Single AIP' task
      int perform​(org.dspace.core.Context ctx, String id)
      Perform 'Move AIP' task
      • Methods inherited from class org.dspace.curate.AbstractCurationTask

        dereference, distribute, performItem, performObject, report, setResult, taskArrayProperty, taskBooleanProperty, taskIntProperty, taskLongProperty, taskProperty
    • Constructor Detail

      • MoveToTrashSingleAIP

        public MoveToTrashSingleAIP()
    • Method Detail

      • init

        public void init​(org.dspace.curate.Curator curator,
                         String taskId)
                  throws IOException
        Specified by:
        init in interface org.dspace.curate.CurationTask
        Overrides:
        init in class org.dspace.curate.AbstractCurationTask
        Throws:
        IOException
      • perform

        public int perform​(org.dspace.content.DSpaceObject dso)
                    throws IOException
        Perform 'Move To Trash Single AIP' task

        Actually generates the AIP and transmits it to the replica ObjectStore

        Specified by:
        perform in interface org.dspace.curate.CurationTask
        Specified by:
        perform in class org.dspace.curate.AbstractCurationTask
        Parameters:
        dso - DSpace Object to perform on
        Returns:
        integer which represents Curator return status
        Throws:
        IOException - if I/O error
      • perform

        public int perform​(org.dspace.core.Context ctx,
                           String id)
                    throws IOException
        Perform 'Move AIP' task

        Moves an existing AIP from the 'group.aip.name' store to the 'group.delete.name' store

        Specified by:
        perform in interface org.dspace.curate.CurationTask
        Overrides:
        perform in class org.dspace.curate.AbstractCurationTask
        Parameters:
        ctx - DSpace Context
        id - ID of object whose AIP should be moved
        Returns:
        integer which represents Curator return status
        Throws:
        IOException - if I/O error