@ApiOperation(value = "Delete an existing ReDBox object", tags = "object")
@ApiResponses({ @ApiResponse(code = 200, message = "The object is deleted"),
@ApiResponse(code = 500, message = "General Error", response = Exception.class) })
@Delete
public String deleteObjectResource() throws IOException, PluginException, MessagingException {
Storage storage = (Storage) ApplicationContextProvider.getApplicationContext().getBean("fascinatorStorage");
Indexer indexer = (Indexer) ApplicationContextProvider.getApplicationContext().getBean("fascinatorIndexer");
String oid = getAttribute("oid");
storage.removeObject(oid);
indexer.remove(oid);
return getSuccessResponseString(oid);
}
}