org.apache.myfaces.tobago.context
Class ResourceManagerUtils

java.lang.Object
  extended by org.apache.myfaces.tobago.context.ResourceManagerUtils

public class ResourceManagerUtils
extends Object


Method Summary
static String getBlankPage(javax.faces.context.FacesContext facesContext)
          Blank page e. g. useful to set src of iframes (to prevent https problems in ie, see TOBAGO-538)
static String getDisabledImageWithPath(javax.faces.context.FacesContext facesContext, String image)
           
static String getImageWithPath(javax.faces.context.FacesContext facesContext, String name)
          Searches for an image and return it with the context path
static String getImageWithPath(javax.faces.context.FacesContext facesContext, String name, boolean ignoreMissing)
          Searches for an image and return it with the context path
static String getPageWithoutContextPath(javax.faces.context.FacesContext facesContext, String name)
           
static String getProperty(javax.faces.context.FacesContext facesContext, String bundle, String key)
           
static String getPropertyNotNull(javax.faces.context.FacesContext facesContext, String bundle, String key)
           
static List<String> getScripts(javax.faces.context.FacesContext facesContext, String name)
           
static String getScriptsAsJSArray(javax.faces.context.FacesContext facesContext, String[] names)
           
static List<String> getStyles(javax.faces.context.FacesContext facesContext, String name)
           
static String getStylesAsJSArray(javax.faces.context.FacesContext facesContext, String[] names)
           
static Measure getThemeMeasure(javax.faces.context.FacesContext facesContext, Configurable configurable, String name)
           
static boolean isAbsoluteResource(String value)
          Detects if the value is an absolute resource or if the value has to be processed by the theme mechanism.
static String toJSArray(List<String> list)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getProperty

public static String getProperty(javax.faces.context.FacesContext facesContext,
                                 String bundle,
                                 String key)

getPropertyNotNull

public static String getPropertyNotNull(javax.faces.context.FacesContext facesContext,
                                        String bundle,
                                        String key)

getImageWithPath

public static String getImageWithPath(javax.faces.context.FacesContext facesContext,
                                      String name)
Searches for an image and return it with the context path


getImageWithPath

public static String getImageWithPath(javax.faces.context.FacesContext facesContext,
                                      String name,
                                      boolean ignoreMissing)
Searches for an image and return it with the context path


getStyles

public static List<String> getStyles(javax.faces.context.FacesContext facesContext,
                                     String name)

getScripts

public static List<String> getScripts(javax.faces.context.FacesContext facesContext,
                                      String name)

getScriptsAsJSArray

public static String getScriptsAsJSArray(javax.faces.context.FacesContext facesContext,
                                         String[] names)

getStylesAsJSArray

public static String getStylesAsJSArray(javax.faces.context.FacesContext facesContext,
                                        String[] names)

toJSArray

public static String toJSArray(List<String> list)

getDisabledImageWithPath

public static String getDisabledImageWithPath(javax.faces.context.FacesContext facesContext,
                                              String image)

getBlankPage

public static String getBlankPage(javax.faces.context.FacesContext facesContext)
Blank page e. g. useful to set src of iframes (to prevent https problems in ie, see TOBAGO-538)


getPageWithoutContextPath

public static String getPageWithoutContextPath(javax.faces.context.FacesContext facesContext,
                                               String name)

getThemeMeasure

public static Measure getThemeMeasure(javax.faces.context.FacesContext facesContext,
                                      Configurable configurable,
                                      String name)

isAbsoluteResource

public static boolean isAbsoluteResource(String value)
Detects if the value is an absolute resource or if the value has to be processed by the theme mechanism. A resource will be treated as absolute, if the value starts with HTTP:, HTTPS:, FTP: or a slash. The case will be ignored by this check. Null values will return true.

Parameters:
value - the given resource link.
Returns:
true if it is an external or absolute resource.


Copyright © 2002-2014 The Apache Software Foundation. All Rights Reserved.