Class BrandingUtil


  • public class BrandingUtil
    extends Object
    Some utility methods related to the branding
    Since:
    8.7.3
    Author:
    Marco Meschieri - LogicalDOC
    • Constructor Detail

      • BrandingUtil

        public BrandingUtil()
    • Method Detail

      • processCss

        public static String processCss​(Branding branding,
                                        String locale,
                                        javax.servlet.http.HttpServletRequest request)
        Processes the branding's CSS using the Automation and returns the result
        Parameters:
        branding - the current branding
        locale - the currently used locale
        request - the current HTTP request
        Returns:
        the processed content
      • processHead

        public static String processHead​(Branding branding,
                                         String locale,
                                         javax.servlet.http.HttpServletRequest request)
        Processes the branding's head using the Automation and returns the result
        Parameters:
        branding - the current branding
        locale - the currently used locale
        request - the current HTTP request
        Returns:
        the processed content
      • processTop

        public static String processTop​(Branding branding,
                                        String locale,
                                        javax.servlet.http.HttpServletRequest request)
        Processes the branding's top using the Automation and returns the result
        Parameters:
        branding - the current branding
        locale - the currently used locale
        request - the current HTTP request
        Returns:
        the processed content
      • processBottom

        public static String processBottom​(Branding branding,
                                           String locale,
                                           javax.servlet.http.HttpServletRequest request)
        Processes the branding's bottom using the Automation and returns the result
        Parameters:
        branding - the current branding
        locale - the currently used locale
        request - the current HTTP request
        Returns:
        the processed content
      • processFooter

        public static String processFooter​(Branding branding,
                                           String locale,
                                           javax.servlet.http.HttpServletRequest request)
        Processes the branding's footer using the Automation and returns the result
        Parameters:
        branding - the current branding
        locale - the currently used locale
        request - the current HTTP request
        Returns:
        the processed content
      • getBranding

        public static Branding getBranding​(String tenantName)
        Retrieves the right branding to use for the given tenant
        Parameters:
        tenantName - name of the tenant
        Returns:
        the branding to use
      • getSkin

        public static String getSkin​(Branding branding,
                                     javax.servlet.http.HttpServletRequest request)
        Retrieves the name of the skin to use for the current request
        Parameters:
        branding - current branding
        request - current request
        Returns:
        the skin name