From 7869b81af1b3ce10cc8f708cde4823e57073c6ac Mon Sep 17 00:00:00 2001 From: Christoph Lorenz Date: Fri, 5 Jul 2024 12:52:30 +0200 Subject: [PATCH] More forward/redirect types --- .../AbstractIdentifiablesController.java | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/main/java/io/github/dbmdz/cudami/controller/identifiable/AbstractIdentifiablesController.java b/src/main/java/io/github/dbmdz/cudami/controller/identifiable/AbstractIdentifiablesController.java index b4e642a8cf..72a049cc30 100644 --- a/src/main/java/io/github/dbmdz/cudami/controller/identifiable/AbstractIdentifiablesController.java +++ b/src/main/java/io/github/dbmdz/cudami/controller/identifiable/AbstractIdentifiablesController.java @@ -116,6 +116,14 @@ public String doForward(Identifiable identifiable, Model model) throws Technical final String uuid = identifiable.getUuid().toString(); IdentifiableObjectType identifiableObjectType = identifiable.getIdentifiableObjectType(); switch (identifiableObjectType) { + case APPLICATION_FILE_RESOURCE: + case AUDIO_FILE_RESOURCE: + case FILE_RESOURCE: + case IMAGE_FILE_RESOURCE: + case LINKED_DATA_FILE_RESOURCE: + case TEXT_FILE_RESOURCE: + case VIDEO_FILE_RESOURCE: + return "forward:/fileresources/" + uuid; case ARTICLE: return "forward:/articles/" + uuid; // List subtopics = @@ -179,8 +187,14 @@ public String doForward(Identifiable identifiable, Model model) throws Technical return "forward:/persons/" + uuid; case PROJECT: return "forward:/projects/" + uuid; + case SUBJECT: + return "forward:/subjects/" + uuid; case TOPIC: return "forward:/topics/" + uuid; + case WEBPAGE: + return "forward:/webpages/" + uuid; + case WEBSITE: + return "forward:/websites/" + uuid; case WORK: return "forward:/works/" + uuid; default: @@ -192,6 +206,14 @@ public String doRedirect(Identifiable identifiable, Model model) throws Technica final String uuid = identifiable.getUuid().toString(); IdentifiableObjectType identifiableObjectType = identifiable.getIdentifiableObjectType(); switch (identifiableObjectType) { + case APPLICATION_FILE_RESOURCE: + case AUDIO_FILE_RESOURCE: + case FILE_RESOURCE: + case IMAGE_FILE_RESOURCE: + case LINKED_DATA_FILE_RESOURCE: + case TEXT_FILE_RESOURCE: + case VIDEO_FILE_RESOURCE: + return "redirect:/fileresources/" + uuid; case ARTICLE: return "redirect:/articles/" + uuid; case COLLECTION: @@ -222,6 +244,10 @@ public String doRedirect(Identifiable identifiable, Model model) throws Technica return "redirect:/subjects/" + uuid; case TOPIC: return "redirect:/topics/" + uuid; + case WEBPAGE: + return "redirect:/webpages/" + uuid; + case WEBSITE: + return "redirect:/websites/" + uuid; case WORK: return "redirect:/works/" + uuid; default: