Class BagItRestoreFromAIP

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

    @Distributive
    @Mutative
    public class BagItRestoreFromAIP
    extends org.dspace.curate.AbstractCurationTask
    BagItRestoreFromAIP task performs essentially an 'undelete' on an object that has been deleted from the repository, using the replica copy. If the object is a container, it recovers all its children/members.
    Author:
    richardrodgers
    See Also:
    TransmitAIP
    • 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 'Recover From AIP' task on a particular object.
      int perform​(org.dspace.core.Context ctx, String id)
      Perform 'Recover From AIP' task by retrieving an object package of a particular ID (name) and restoring it to the current DSpace Context.
      • Methods inherited from class org.dspace.curate.AbstractCurationTask

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

      • BagItRestoreFromAIP

        public BagItRestoreFromAIP()
    • 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 'Recover From AIP' task on a particular object. If the dso is a Site, attempt to restore the Site and child objects. Otherwise this method returns an exception.
        Specified by:
        perform in interface org.dspace.curate.CurationTask
        Specified by:
        perform in class org.dspace.curate.AbstractCurationTask
        Parameters:
        dso - DSpace Object to recover
        Returns:
        integer which represents Curator return status
        Throws:
        IOException - if IO error
      • perform

        public int perform​(org.dspace.core.Context ctx,
                           String id)
                    throws IOException
        Perform 'Recover From AIP' task by retrieving an object package of a particular ID (name) and restoring it to the current DSpace Context.
        Specified by:
        perform in interface org.dspace.curate.CurationTask
        Overrides:
        perform in class org.dspace.curate.AbstractCurationTask
        Parameters:
        ctx - current DSpace context
        id - identifier of object to restore
        Returns:
        integer which represents Curator return status
        Throws:
        IOException - if IO error