java.lang.Object
de.digitalcollections.cudami.frontend.website.controller.UrlAliasController

@Controller public class UrlAliasController extends Object
  • Constructor Details

    • UrlAliasController

      public UrlAliasController(de.digitalcollections.cudami.client.CudamiClient cudamiClient, CudamiConfig cudamiConfig)
  • Method Details

    • fallback

      @GetMapping("/{slug:[a-zA-Z0-9-]+}") public String fallback(jakarta.servlet.http.HttpServletRequest request, @PathVariable String slug) throws de.digitalcollections.model.exception.ResourceNotFoundException, de.digitalcollections.model.exception.TechnicalException
      Forwards to Identifiable specific endpoint if SLUG is a primary url alias. Redirects to primary SLUG if given SLUG is not a primaray url alias.
      Parameters:
      request - current http request
      slug - human readable relative URL to an identifiable
      Returns:
      target webpage or redirect to primary slug
      Throws:
      de.digitalcollections.model.exception.ResourceNotFoundException - if slug is unknown
      de.digitalcollections.model.exception.TechnicalException - if backend system error
    • getLocaleFromPrimaryUrlAliases

      protected Locale getLocaleFromPrimaryUrlAliases(de.digitalcollections.model.identifiable.alias.LocalizedUrlAliases localizedUrlAliases)