Class SitemapRestController


  • @Controller
    @RequestMapping("/${sitemap.path:sitemaps}")
    public class SitemapRestController
    extends Object
    This is a specialized controller to provide access to the sitemap files, generated by GenerateSitemaps The mapping for requested endpoint try to resolve a valid sitemap file name, for example
     
     https://<dspace.server.url>/sitemaps/26453b4d-e513-44e8-8d5b-395f62972eff/sitemap0.html
     
     
    Author:
    Maria Verdonck (Atmire) on 08/07/2020
    • Constructor Detail

      • SitemapRestController

        public SitemapRestController()
    • Method Detail

      • retrieve

        @GetMapping("/{name}")
        public org.springframework.http.ResponseEntity retrieve​(@PathVariable
                                                                String name,
                                                                javax.servlet.http.HttpServletResponse response,
                                                                javax.servlet.http.HttpServletRequest request)
                                                         throws IOException,
                                                                SQLException
        Tries to retrieve a matching sitemap file in configured location
        Parameters:
        name - the name of the requested sitemap file
        response - the HTTP response
        request - the HTTP request
        Returns:
        Throws:
        SQLException - if db error while completing DSpace context
        IOException - if IO error surrounding sitemap file