org.apache.myfaces.tobago.context
Class ResourceManagerUtil

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

public class ResourceManagerUtil
extends java.lang.Object


Method Summary
static java.lang.String getBlankPage(FacesContext facesContext)
           
static java.lang.String getDisabledImageWithPath(FacesContext facesContext, java.lang.String image)
           
static java.lang.String getImageWithPath(FacesContext facesContext, java.lang.String name)
          Searchs for an image and return it with the context path
static java.lang.String getImageWithPath(FacesContext facesContext, java.lang.String name, boolean ignoreMissing)
          Searchs for an image and return it with the context path
static java.lang.String getImageWithPath(FacesContext facesContext, java.lang.String image, CommandRendererHelper helper)
           
static java.lang.String getPageWithoutContextPath(FacesContext facesContext, java.lang.String name)
           
static java.lang.String getProperty(FacesContext facesContext, java.lang.String bundle, java.lang.String key)
           
static java.lang.String getPropertyNotNull(FacesContext facesContext, java.lang.String bundle, java.lang.String key)
           
static java.util.List<java.lang.String> getScripts(FacesContext facesContext, java.lang.String name)
           
static java.lang.String getScriptsAsJSArray(FacesContext facesContext, java.lang.String[] names)
           
static java.util.List<java.lang.String> getStyles(FacesContext facesContext, java.lang.String name)
           
static java.lang.String getStylesAsJSArray(FacesContext facesContext, java.lang.String[] names)
           
static boolean isAbsoluteResource(java.lang.String value)
          Detects if the value is an absolute resource or if the value has to be processed by the theme mechanism.
static java.lang.String toJSArray(java.util.List<java.lang.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 java.lang.String getProperty(FacesContext facesContext,
                                           java.lang.String bundle,
                                           java.lang.String key)

getPropertyNotNull

public static java.lang.String getPropertyNotNull(FacesContext facesContext,
                                                  java.lang.String bundle,
                                                  java.lang.String key)

getImageWithPath

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


getImageWithPath

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


getStyles

public static java.util.List<java.lang.String> getStyles(FacesContext facesContext,
                                                         java.lang.String name)

getScripts

public static java.util.List<java.lang.String> getScripts(FacesContext facesContext,
                                                          java.lang.String name)

getScriptsAsJSArray

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

getStylesAsJSArray

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

toJSArray

public static java.lang.String toJSArray(java.util.List<java.lang.String> list)

getDisabledImageWithPath

public static java.lang.String getDisabledImageWithPath(FacesContext facesContext,
                                                        java.lang.String image)

getImageWithPath

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

getBlankPage

public static java.lang.String getBlankPage(FacesContext facesContext)

getPageWithoutContextPath

public static java.lang.String getPageWithoutContextPath(FacesContext facesContext,
                                                         java.lang.String name)

isAbsoluteResource

public static boolean isAbsoluteResource(java.lang.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-2013 The Apache Software Foundation. All Rights Reserved.