{
try
{
VersioningService versioningService = new DSpace()
.getSingletonService(VersioningService.class);
VersionHistory versionHistory = versioningService
.findVersionHistory(context, itemId);
for (String id : versionIDs)
{
versioningService.removeVersion(context, Integer.parseInt(id));
}
context.commit();
// Retrieve the latest version of our history (IF any is even
// present)