org.apache.myfaces.tobago.context
Class ResourceManagerUtil

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

public class ResourceManagerUtil
extends Object


Method Summary
static String getBlankPage(FacesContext facesContext)
           
static String getDisabledImageWithPath(FacesContext facesContext, String image)
           
static String getImageWithPath(FacesContext facesContext, String name)
          Searchs for an image and return it with the context path
static String getImageWithPath(FacesContext facesContext, String name, boolean ignoreMissing)
          Searchs for an image and return it with the context path
static String getImageWithPath(FacesContext facesContext, String image, CommandRendererHelper helper)
           
static String getPageWithoutContextPath(FacesContext facesContext, String name)
           
static String getProperty(FacesContext facesContext, String bundle, String key)
           
static String getPropertyNotNull(FacesContext facesContext, String bundle, String key)
           
static List<String> getScripts(FacesContext facesContext, String name)
           
static String getScriptsAsJSArray(FacesContext facesContext, String[] names)
           
static List<String> getStyles(FacesContext facesContext, String name)
           
static String getStylesAsJSArray(FacesContext facesContext, String[] names)
           
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(FacesContext facesContext,
                                 String bundle,
                                 String key)

getPropertyNotNull

public static String getPropertyNotNull(FacesContext facesContext,
                                        String bundle,
                                        String key)

getImageWithPath

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


getImageWithPath

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


getStyles

public static List<String> getStyles(FacesContext facesContext,
                                     String name)

getScripts

public static List<String> getScripts(FacesContext facesContext,
                                      String name)

getScriptsAsJSArray

public static String getScriptsAsJSArray(FacesContext facesContext,
                                         String[] names)

getStylesAsJSArray

public static String getStylesAsJSArray(FacesContext facesContext,
                                        String[] names)

toJSArray

public static String toJSArray(List<String> list)

getDisabledImageWithPath

public static String getDisabledImageWithPath(FacesContext facesContext,
                                              String image)

getImageWithPath

public static String getImageWithPath(FacesContext facesContext,
                                      String image,
                                      CommandRendererHelper helper)

getBlankPage

public static String getBlankPage(FacesContext facesContext)

getPageWithoutContextPath

public static String getPageWithoutContextPath(FacesContext facesContext,
                                               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-2011 Apache Software Foundation. All Rights Reserved.