Package org.dspace.ctask.replicate
Class MoveToTrashSingleAIP
- java.lang.Object
-
- org.dspace.curate.AbstractCurationTask
-
- org.dspace.ctask.replicate.MoveToTrashSingleAIP
-
- All Implemented Interfaces:
org.dspace.curate.CurationTask
@Distributive public class MoveToTrashSingleAIP extends org.dspace.curate.AbstractCurationTaskMoveToTrashSingleAIP 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
-
-
Constructor Summary
Constructors Constructor Description MoveToTrashSingleAIP()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinit(org.dspace.curate.Curator curator, String taskId)intperform(org.dspace.content.DSpaceObject dso)Perform 'Move To Trash Single AIP' taskintperform(org.dspace.core.Context ctx, String id)Perform 'Move AIP' task
-
-
-
Method Detail
-
init
public void init(org.dspace.curate.Curator curator, String taskId) throws IOException- Specified by:
initin interfaceorg.dspace.curate.CurationTask- Overrides:
initin classorg.dspace.curate.AbstractCurationTask- Throws:
IOException
-
perform
public int perform(org.dspace.content.DSpaceObject dso) throws IOExceptionPerform 'Move To Trash Single AIP' taskActually generates the AIP and transmits it to the replica ObjectStore
- Specified by:
performin interfaceorg.dspace.curate.CurationTask- Specified by:
performin classorg.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 IOExceptionPerform 'Move AIP' taskMoves an existing AIP from the 'group.aip.name' store to the 'group.delete.name' store
- Specified by:
performin interfaceorg.dspace.curate.CurationTask- Overrides:
performin classorg.dspace.curate.AbstractCurationTask- Parameters:
ctx- DSpace Contextid- ID of object whose AIP should be moved- Returns:
- integer which represents Curator return status
- Throws:
IOException- if I/O error
-
-