Revision ed33cbd7
Added by Katja Luther almost 7 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/media/operation/DeleteMediaOperation.java | ||
---|---|---|
76 | 76 |
monitor.worked(20); |
77 | 77 |
DeleteResult result = CdmStore.getService(IMediaService.class).delete(media.getUuid(), config); |
78 | 78 |
String errorMessage = "The media "; |
79 |
if (result.isOk()){ |
|
80 |
ImagesUtility.removeMediaFromGallery(description, media); |
|
81 |
} else{ |
|
79 |
ImagesUtility.removeMediaFromGallery(description, media); |
|
80 |
if (!result.isOk()){ |
|
82 | 81 |
List<String> messages = new ArrayList<String>(); |
83 | 82 |
int i = result.getExceptions().size(); |
84 | 83 |
for (Exception e:result.getExceptions()){ |
85 | 84 |
messages.add(e.getMessage()); |
86 | 85 |
} |
87 |
errorMessage += "could not be deleted.";
|
|
86 |
errorMessage += "could not be deleted from database. ";
|
|
88 | 87 |
//MessagingUtils.errorDialog("test", getClass(), "message", TaxeditorBulkeditorPlugin.PLUGIN_ID, result.getExceptions().iterator().next(),true); |
89 | 88 |
DeleteResultMessagingUtils.messageDialogWithDetails(result,errorMessage, TaxeditorBulkeditorPlugin.PLUGIN_ID); |
90 | 89 |
} |
Also available in: Unified diff
ref #6527: change the labels for media deletion config and remove undeletable media from gallery