@Override public Response onDelete() { // delete icon and plan model reference ... // delete icon // we use the URL stored in the data instead of the generated URL to be compatible with manually edits RepositoryFileReference ref = new RepositoryFileReference(this.ssmdId, this.o.getIconUrl()); try { RepositoryFactory.getRepository().forceDelete(ref); } catch (IOException e) { OptionResource.LOGGER.error("Could not remove file", e); return Response.status(Status.INTERNAL_SERVER_ERROR).entity(e.getMessage()).build(); } // delete plan input // we use the URL stored in the data instead of the generated URL to be compatible with manually edits ref = new RepositoryFileReference(this.ssmdId, this.o.getPlanInputMessageUrl()); try { RepositoryFactory.getRepository().forceDelete(ref); } catch (IOException e) { OptionResource.LOGGER.error("Could not remove file", e); return Response.status(Status.INTERNAL_SERVER_ERROR).entity(e.getMessage()).build(); } // after deleting files, continue with list deletion return super.onDelete(); } }
putRefIntoRefMap(targetDir, refMap, repository, id, url); url = option.getPlanInputMessageUrl(); if (Util.isRelativeURI(url)) { putRefIntoRefMap(targetDir, refMap, repository, id, url);