Package org.sakaiproject.portal.util
Class CSSUtils
- java.lang.Object
-
- org.sakaiproject.portal.util.CSSUtils
-
public class CSSUtils extends Object
-
-
Constructor Summary
Constructors Constructor Description CSSUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringadjustCssSkinFolder(String skinFolder)Captures the (yes) overly complex rules for the skin folder naming conventionstatic StringgetCssHead(String skin, boolean isInlineRequest)static StringgetCssPortalSkin(String skinFolder)Returns a URL for the portal.css suitable for putting in an href= field.static StringgetCssPortalSkinCDN(String skinFolder)Returns a URL for the portal.css suitable for putting in an href= field resolved for CDNstatic StringgetCssPrintSkin(String skinFolder)Returns a URL for the print.css suitable for putting in an href= field for media="print".static StringgetCssPrintSkinCDN(String skinFolder)Returns a URL for the print.css suitable for putting in an href= field for media="print"static StringgetCssPropertiesSkin(String skinFolder)Returns a URL for the properties.css suitable for putting in an href= field.static StringgetCssPropertiesSkinCDN(String skinFolder)Returns a URL for the properties.css suitable for putting in an href= fieldstatic StringgetCssToolBase()Returns a URL for the tool_base.css suitable for putting in an href= field.static StringgetCssToolBaseCDN()Returns a URL for the tool_base.css suitable for putting in an href= fieldresolved for CDNstatic StringgetCssToolBaseLink(String skin, boolean isInlineRequest)Gets the full CSS link for the tool skin (including print version)static StringgetCssToolSkin(String skinFolder)Returns a URL for the tool.css suitable for putting in an href= field.static StringgetCssToolSkinCDN(String skinFolder)Returns a URL for the tool.css suitable for putting in an href= field.static StringgetCssToolSkinLink(String skin, boolean isInlineRequest)static StringgetPortalSkinLink(String skin)Gets the full CSS link for the portal skinstatic StringgetSkinFromSite(Site site)Convenience method to retrieve the skin folder from a site
-
-
-
Method Detail
-
getCssToolBase
public static String getCssToolBase()
Returns a URL for the tool_base.css suitable for putting in an href= field.- Returns:
cssToolBaseURL 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:
cssToolBaseURL 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:
skinFolderThe 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:
cssToolSkinURL 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:
cssPrintSkinURL 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:
cssPrintSkinURL 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:
cssPortalSkinURL 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:
cssPortalSkinURL 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:
cssToolSkinURL 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:
cssPrintSkinURL 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:
cssPropertiesSkinURL 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
-
-