Class TemplateLocatorServiceImpl

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String findTemplate​(java.lang.String site, java.lang.String requestURI)
      This method does return template page html-data.
      java.lang.String findTemplateByPath​(java.lang.String path)
      This method does return template page html-data.
      private java.lang.String getDynamicTemplate​(java.lang.String path)  
      private java.lang.String getExternalFragmentHtml​(java.lang.String path)  
      private java.lang.String getExternalPageHtml​(java.lang.String path)  
      private java.lang.String getExternalPagePath​(java.lang.String path)  
      java.lang.String getFragmentHtml​(java.lang.String path)
      This method does return template fragment html-data.
      java.lang.String getFragmentPath​(java.lang.String path)
      This method does return template fragment path.
      private java.lang.String getInternalHtml​(java.lang.String path)  
      private java.lang.String getInternalPath​(java.lang.String path)  
      java.lang.String getPageHtml​(java.lang.String path)
      This method does return template page html-data.
      java.lang.String getPagePath​(java.lang.String path)
      This method does return template page path.
      private java.lang.String getTemplateFromFilesystemRoot​(java.lang.String currentPath)  
      private java.lang.String getTemplateFromFileuploadRoot​(java.lang.String currentPath)  
      private boolean isRouteToIgnore​(org.json.JSONObject currentSPA, java.lang.String route)  
      private java.util.Map<java.lang.String,​java.lang.String> rebuildPath​(java.lang.String currentPath)  
      • Methods inherited from class java.lang.Object

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

      • env

        @Autowired
        private org.springframework.core.env.Environment env
      • logger

        private static final org.slf4j.Logger logger
    • Constructor Detail

      • TemplateLocatorServiceImpl

        public TemplateLocatorServiceImpl()
    • Method Detail

      • findTemplate

        public java.lang.String findTemplate​(java.lang.String site,
                                             java.lang.String requestURI)
        Description copied from interface: TemplateLocatorService
        This method does return template page html-data.
        Specified by:
        findTemplate in interface TemplateLocatorService
        Parameters:
        site - the root folder to be used for searching
        requestURI - the rest part of the path
        Returns:
        template content as html-string
      • findTemplateByPath

        public java.lang.String findTemplateByPath​(java.lang.String path)
        Description copied from interface: TemplateLocatorService
        This method does return template page html-data.
        Specified by:
        findTemplateByPath in interface TemplateLocatorService
        Parameters:
        path - the path to be used for search
        Returns:
        template content as html-string
      • getPagePath

        public java.lang.String getPagePath​(java.lang.String path)
        Description copied from interface: TemplateLocatorService
        This method does return template page path.
        Specified by:
        getPagePath in interface TemplateLocatorService
        Parameters:
        path - path of page which will be returned
        Returns:
        template content as html-string
      • getFragmentPath

        public java.lang.String getFragmentPath​(java.lang.String path)
        Description copied from interface: TemplateLocatorService
        This method does return template fragment path.
        Specified by:
        getFragmentPath in interface TemplateLocatorService
        Parameters:
        path - path of fragment which will be returned
        Returns:
        data as text
      • getPageHtml

        public java.lang.String getPageHtml​(java.lang.String path)
        Description copied from interface: TemplateLocatorService
        This method does return template page html-data.
        Specified by:
        getPageHtml in interface TemplateLocatorService
        Parameters:
        path - html of page which will be returned
        Returns:
        html-data as text
      • getFragmentHtml

        public java.lang.String getFragmentHtml​(java.lang.String path)
        Description copied from interface: TemplateLocatorService
        This method does return template fragment html-data.
        Specified by:
        getFragmentHtml in interface TemplateLocatorService
        Parameters:
        path - html of fragment which will be returned
        Returns:
        html-data as text
      • isRouteToIgnore

        private boolean isRouteToIgnore​(org.json.JSONObject currentSPA,
                                        java.lang.String route)
      • getTemplateFromFileuploadRoot

        private java.lang.String getTemplateFromFileuploadRoot​(java.lang.String currentPath)
      • getTemplateFromFilesystemRoot

        private java.lang.String getTemplateFromFilesystemRoot​(java.lang.String currentPath)
      • getExternalFragmentHtml

        private java.lang.String getExternalFragmentHtml​(java.lang.String path)
      • getExternalPageHtml

        private java.lang.String getExternalPageHtml​(java.lang.String path)
      • getInternalHtml

        private java.lang.String getInternalHtml​(java.lang.String path)
      • getExternalPagePath

        private java.lang.String getExternalPagePath​(java.lang.String path)
      • getInternalPath

        private java.lang.String getInternalPath​(java.lang.String path)
      • rebuildPath

        private java.util.Map<java.lang.String,​java.lang.String> rebuildPath​(java.lang.String currentPath)
      • getDynamicTemplate

        private java.lang.String getDynamicTemplate​(java.lang.String path)