mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 01:54:22 +00:00
[DS-199] SWORD module doesn't accept X-No-Op header (dry run)
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@3825 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
@@ -273,39 +273,12 @@ public class CollectionDepositor extends Depositor
|
||||
* @throws DSpaceSWORDException
|
||||
*/
|
||||
public void undoDeposit(DepositResult result) throws DSpaceSWORDException
|
||||
{
|
||||
try
|
||||
{
|
||||
SWORDContext sc = swordService.getSwordContext();
|
||||
|
||||
// obtain the item's owning collection (there can be only one)
|
||||
// and ask it to remove the item. Although we're going to abort
|
||||
// the context, so that this nevers gets written to the db,
|
||||
// it will get rid of the files on the disk
|
||||
Item item = result.getItem();
|
||||
Collection collection = item.getOwningCollection();
|
||||
collection.removeItem(item);
|
||||
|
||||
swordService.message("Removing temporary files from disk");
|
||||
|
||||
// abort the context, so no database changes are written
|
||||
// uploaded files will be deleted by the cleanup script
|
||||
sc.abort();
|
||||
swordService.message("Database changes aborted");
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
log.error("caught exception: ", e);
|
||||
throw new DSpaceSWORDException(e);
|
||||
}
|
||||
catch (AuthorizeException e)
|
||||
{
|
||||
log.error("authentication problem; caught exception: ", e);
|
||||
throw new DSpaceSWORDException(e);
|
||||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
log.error("caught exception: ", e);
|
||||
throw new DSpaceSWORDException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -26,6 +26,7 @@
|
||||
|
||||
(Andrea Bollini)
|
||||
- [DS-206] Input form visibility restriction doesn't work properly
|
||||
- [DS-199] SWORD module doesn't accept X-No-Op header (dry run)
|
||||
|
||||
1.5.2 final
|
||||
===========
|
||||
|
Reference in New Issue
Block a user