Class MainApplicationController

  • All Implemented Interfaces:
    org.springframework.beans.factory.InitializingBean

    @RestController
    public class MainApplicationController
    extends java.lang.Object
    implements org.springframework.beans.factory.InitializingBean
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void afterPropertiesSet()  
      org.springframework.http.ResponseEntity<?> templateHandler​(java.lang.String site, java.security.Principal principal, java.lang.String lang)
      This is entrypoint for HTTP-requests from the clients, where it loads a HTML-template from filesystem.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MainApplicationController

        public MainApplicationController()
    • Method Detail

      • templateHandler

        @RequestMapping("/{site}/**/*.html")
        @ResponseBody
        public org.springframework.http.ResponseEntity<?> templateHandler​(@PathVariable("site")
                                                                          java.lang.String site,
                                                                          @AuthenticationPrincipal
                                                                          java.security.Principal principal,
                                                                          @CookieValue(name="i18next",required=false)
                                                                          java.lang.String lang)
        This is entrypoint for HTTP-requests from the clients, where it loads a HTML-template from filesystem.
        Parameters:
        site - this is identification for a folder in /MSM2/www/{site}
        principal - this is keep authorization data for the request
        lang - this is cookie value for a language code
        Returns:
        response as valid HTML
      • afterPropertiesSet

        public void afterPropertiesSet()
        Specified by:
        afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean