Skip to content

Commit

Permalink
More forward/redirect types
Browse files Browse the repository at this point in the history
  • Loading branch information
clorenz committed Jul 5, 2024
1 parent ad5d818 commit 7869b81
Showing 1 changed file with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<SubtopicImpl> subtopics =
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 7869b81

Please sign in to comment.