Class ThemeBasedViewResolver

  • All Implemented Interfaces:
    org.springframework.core.Ordered, org.springframework.web.servlet.ViewResolver

    public class ThemeBasedViewResolver
    extends java.lang.Object
    implements org.springframework.web.servlet.ViewResolver, org.springframework.core.Ordered
    ThemeBasedViewResolver is a View Resolver that takes the active theme into account to selectively choose which set of UI views will be used to generate the standard views.
    Since:
    5.2.0
    • Field Summary

      • Fields inherited from interface org.springframework.core.Ordered

        HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected org.springframework.web.servlet.ViewResolver getViewResolver​(java.lang.String theme)
      Get (or create) the view resolver for the theme.
      org.springframework.web.servlet.View resolveViewName​(java.lang.String viewName, java.util.Locale locale)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.springframework.core.Ordered

        getOrder
    • Constructor Detail

      • ThemeBasedViewResolver

        public ThemeBasedViewResolver()
    • Method Detail

      • resolveViewName

        public org.springframework.web.servlet.View resolveViewName​(java.lang.String viewName,
                                                                    java.util.Locale locale)
        Specified by:
        resolveViewName in interface org.springframework.web.servlet.ViewResolver
      • getViewResolver

        protected org.springframework.web.servlet.ViewResolver getViewResolver​(java.lang.String theme)
        Get (or create) the view resolver for the theme.
        Parameters:
        theme - the theme
        Returns:
        the view resolver