Class RemoveAIP

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

    @Distributive
    public class RemoveAIP
    extends org.dspace.curate.AbstractCurationTask
    RemoveAIP task will remove requested objects from the replica store. If the object is a container, all its children (members) will also be removed.
    Author:
    richardrodgers
    See Also:
    TransmitAIP
    • Field Summary

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

        configurationService, curator, handleService, taskId
    • Constructor Summary

      Constructors 
      Constructor Description
      RemoveAIP()  
    • 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)
      Removes replicas of passed object from the replica store.
      int perform​(org.dspace.core.Context ctx, String id)
      Removes replicas of passed id from the replica store.
      • Methods inherited from class org.dspace.curate.AbstractCurationTask

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

      • RemoveAIP

        public RemoveAIP()
    • 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
        Removes replicas of passed object from the replica store. If a container, removes all the member replicas, in addition to the replica of the container object. No change is made to the DSPace object itself.
        Specified by:
        perform in interface org.dspace.curate.CurationTask
        Specified by:
        perform in class org.dspace.curate.AbstractCurationTask
        Parameters:
        dso - the DSpace object
        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
        Removes replicas of passed id from the replica store. This can act in one of two ways: either there is an existing DSpace Object with this id, in which case it behaves like the previous method, or there is no DSpace Object, in which case we assume that the object has been deleted. In this case, the replica store is purged of the deleted object, or objects, if the id is (was) a container.
        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 the object to be removed.
        Returns:
        integer which represents Curator return status
        Throws:
        IOException - if I/O error