mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-17 15:03:18 +00:00
DS-3179
This commit is contained in:
@@ -254,7 +254,6 @@ public class BitstreamServiceImpl extends DSpaceObjectServiceImpl<Bitstream> imp
|
|||||||
bundle.getBitstreams().remove(bitstream);
|
bundle.getBitstreams().remove(bitstream);
|
||||||
}
|
}
|
||||||
//Remove all bundles from the bitstream object, clearing the connection in 2 ways
|
//Remove all bundles from the bitstream object, clearing the connection in 2 ways
|
||||||
bundles.clear();
|
|
||||||
|
|
||||||
|
|
||||||
// Remove policies
|
// Remove policies
|
||||||
@@ -263,8 +262,8 @@ public class BitstreamServiceImpl extends DSpaceObjectServiceImpl<Bitstream> imp
|
|||||||
// Remove bitstream itself
|
// Remove bitstream itself
|
||||||
bitstream.setDeleted(true);
|
bitstream.setDeleted(true);
|
||||||
update(context, bitstream);
|
update(context, bitstream);
|
||||||
// Remove policies from the file, we do this at the end since the methods above still require write rights.
|
|
||||||
authorizeService.removeAllPolicies(context, bitstream);
|
bundles.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@@ -412,10 +412,6 @@ public class BundleServiceImpl extends DSpaceObjectServiceImpl<Bundle> implement
|
|||||||
item.removeBundle(bundle);
|
item.removeBundle(bundle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// remove our authorization policies
|
|
||||||
authorizeService.removeAllPolicies(context, bundle);
|
|
||||||
|
|
||||||
// Remove ourself
|
// Remove ourself
|
||||||
bundleDAO.delete(context, bundle);
|
bundleDAO.delete(context, bundle);
|
||||||
}
|
}
|
||||||
|
@@ -744,9 +744,6 @@ public class CollectionServiceImpl extends DSpaceObjectServiceImpl<Collection> i
|
|||||||
owningCommunity.getCollections().remove(collection);
|
owningCommunity.getCollections().remove(collection);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove all authorization policies
|
|
||||||
authorizeService.removeAllPolicies(context, collection);
|
|
||||||
|
|
||||||
collectionDAO.delete(context, collection);
|
collectionDAO.delete(context, collection);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -527,9 +527,6 @@ public class CommunityServiceImpl extends DSpaceObjectServiceImpl<Community> imp
|
|||||||
// Remove the logo
|
// Remove the logo
|
||||||
setLogo(context, community, null);
|
setLogo(context, community, null);
|
||||||
|
|
||||||
// Remove all authorization policies
|
|
||||||
authorizeService.removeAllPolicies(context, community);
|
|
||||||
|
|
||||||
// Remove any Handle
|
// Remove any Handle
|
||||||
handleService.unbindHandle(context, community);
|
handleService.unbindHandle(context, community);
|
||||||
|
|
||||||
|
@@ -294,17 +294,10 @@ public class ItemServiceImpl extends DSpaceObjectServiceImpl<Item> implements It
|
|||||||
log.info(LogManager.getHeader(context, "remove_bundle", "item_id="
|
log.info(LogManager.getHeader(context, "remove_bundle", "item_id="
|
||||||
+ item.getID() + ",bundle_id=" + bundle.getID()));
|
+ item.getID() + ",bundle_id=" + bundle.getID()));
|
||||||
|
|
||||||
|
|
||||||
item.removeBundle(bundle);
|
|
||||||
bundle.removeItem(item);
|
|
||||||
|
|
||||||
|
|
||||||
context.addEvent(new Event(Event.REMOVE, Constants.ITEM, item.getID(),
|
context.addEvent(new Event(Event.REMOVE, Constants.ITEM, item.getID(),
|
||||||
Constants.BUNDLE, bundle.getID(), bundle.getName(), getIdentifiers(context, item)));
|
Constants.BUNDLE, bundle.getID(), bundle.getName(), getIdentifiers(context, item)));
|
||||||
|
|
||||||
if (CollectionUtils.isEmpty(bundle.getItems())) {
|
|
||||||
bundleService.delete(context, bundle);
|
bundleService.delete(context, bundle);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -618,9 +611,6 @@ public class ItemServiceImpl extends DSpaceObjectServiceImpl<Item> implements It
|
|||||||
item.getCollections().clear();
|
item.getCollections().clear();
|
||||||
item.setOwningCollection(null);
|
item.setOwningCollection(null);
|
||||||
|
|
||||||
// remove all of our authorization policies
|
|
||||||
authorizeService.removeAllPolicies(context, item);
|
|
||||||
|
|
||||||
// Remove any Handle
|
// Remove any Handle
|
||||||
handleService.unbindHandle(context, item);
|
handleService.unbindHandle(context, item);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user