Class CSSUtils


  • public class CSSUtils
    extends Object
    • Constructor Detail

      • CSSUtils

        public CSSUtils()
    • Method Detail

      • getCssToolBase

        public static String getCssToolBase()
        Returns a URL for the tool_base.css suitable for putting in an href= field.
        Returns:
        cssToolBase URL for the tool_base.css
      • getCssToolBaseCDN

        public static String getCssToolBaseCDN()
        Returns a URL for the tool_base.css suitable for putting in an href= fieldresolved for CDN
        Returns:
        cssToolBase URL for the tool_base.css
      • adjustCssSkinFolder

        public static String adjustCssSkinFolder​(String skinFolder)
        Captures the (yes) overly complex rules for the skin folder naming convention
        Type Parameters:
        code - skinFolder The folder where the skins are to be found.
        Returns:
        skinFolder The adjusted folder where the skins can be found.
      • getCssToolSkin

        public static String getCssToolSkin​(String skinFolder)
        Returns a URL for the tool.css suitable for putting in an href= field.
        Type Parameters:
        code - skinFolder where the tool.css skin lives for this site.
        Returns:
        cssToolSkin URL for the tool.css
      • getCssPrintSkin

        public static String getCssPrintSkin​(String skinFolder)
        Returns a URL for the print.css suitable for putting in an href= field for media="print".
        Type Parameters:
        code - skinFolder where the print.css skin lives for this site.
        Returns:
        cssPrintSkin URL for the print.css
      • getCssPropertiesSkin

        public static String getCssPropertiesSkin​(String skinFolder)
        Returns a URL for the properties.css suitable for putting in an href= field.
        Type Parameters:
        code - skinFolder where the properties.css skin lives for this site.
        Returns:
        cssPrintSkin URL for the properties.css
      • getCssPortalSkin

        public static String getCssPortalSkin​(String skinFolder)
        Returns a URL for the portal.css suitable for putting in an href= field.
        Type Parameters:
        code - skinFolder where the portal.css skin lives for this site.
        Returns:
        cssPortalSkin URL for the portal.css
      • getCssPortalSkinCDN

        public static String getCssPortalSkinCDN​(String skinFolder)
        Returns a URL for the portal.css suitable for putting in an href= field resolved for CDN
        Type Parameters:
        code - skinFolder where the portal.css skin lives for this site.
        Returns:
        cssPortalSkin URL for the portal.css
      • getCssToolSkinCDN

        public static String getCssToolSkinCDN​(String skinFolder)
        Returns a URL for the tool.css suitable for putting in an href= field.
        Type Parameters:
        code - skinFolder where the tool.css skin lives for this site.
        Returns:
        cssToolSkin URL for the tool.css
      • getCssPrintSkinCDN

        public static String getCssPrintSkinCDN​(String skinFolder)
        Returns a URL for the print.css suitable for putting in an href= field for media="print"
        Type Parameters:
        code - skinFolder where the print.css skin lives for this site.
        Returns:
        cssPrintSkin URL for the print.css
      • getCssPropertiesSkinCDN

        public static String getCssPropertiesSkinCDN​(String skinFolder)
        Returns a URL for the properties.css suitable for putting in an href= field
        Type Parameters:
        code - skinFolder where the properties.css skin lives for this site.
        Returns:
        cssPropertiesSkin URL for the properties.css
      • getSkinFromSite

        public static String getSkinFromSite​(Site site)
        Convenience method to retrieve the skin folder from a site
        Parameters:
        site -
        Returns:
        skinFolder
      • getPortalSkinLink

        public static String getPortalSkinLink​(String skin)
        Gets the full CSS link for the portal skin
        Parameters:
        skin -
        Returns:
        headCssPortalSkin
      • getCssToolBaseLink

        public static String getCssToolBaseLink​(String skin,
                                                boolean isInlineRequest)
        Gets the full CSS link for the tool skin (including print version)
        Parameters:
        skin -
        isInlineRequest -
        Returns:
        headCssToolBse
      • getCssToolSkinLink

        public static String getCssToolSkinLink​(String skin,
                                                boolean isInlineRequest)
      • getCssHead

        public static String getCssHead​(String skin,
                                        boolean isInlineRequest)