Save This Page
Home » mojarra-1.2_09-b02-FCS-source » com.sun.faces.util » [javadoc | source]
com.sun.faces.util
public class: Util [javadoc | source]
java.lang.Object
   com.sun.faces.util.Util
Util is a class ...

Lifetime And Scope

Nested Class Summary:
public static interface  Util.TreeTraversalCallback   
Field Summary
public static final  String RENDERKIT_LOGGER     
public static final  String TAGLIB_LOGGER     
public static final  String APPLICATION_LOGGER     
public static final  String CONTEXT_LOGGER     
public static final  String CONFIG_LOGGER     
public static final  String LIFECYCLE_LOGGER     
public static final  String TIMING_LOGGER     
Method from com.sun.faces.util.Util Summary:
componentIsDisabled,   componentIsDisabledOrReadonly,   getContentTypeFromResponse,   getConverterForClass,   getConverterForIdentifer,   getCurrentLoader,   getFacesMapping,   getFeatureDescriptor,   getListenerInstance,   getLocaleFromContextOrSystem,   getLocaleFromString,   getStackTraceString,   getStateManager,   getViewHandler,   indexOfSet,   isCoreTLVActive,   isHtmlTLVActive,   isPrefixMapped,   isUnitTestModeEnabled,   loadClass,   notNull,   parameterNonEmpty,   parameterNonNull,   prefixViewTraversal,   setCoreTLVActive,   setHtmlTLVActive,   setUnitTestModeEnabled,   split
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.sun.faces.util.Util Detail:
 public static boolean componentIsDisabled(UIComponent component) 
 public static boolean componentIsDisabledOrReadonly(UIComponent component) 
 public static String getContentTypeFromResponse(Object response) 

    PRECONDITION: argument response is non-null and has a method called getContentType that takes no arguments and returns a String, with no side-effects.

    This method allows us to get the contentType in both the servlet and portlet cases, without introducing a compile-time dependency on the portlet api.

 public static Converter getConverterForClass(Class converterClass,
    FacesContext context) 
 public static Converter getConverterForIdentifer(String converterId,
    FacesContext context) 
 public static ClassLoader getCurrentLoader(Object fallbackClass) 
 public static String getFacesMapping(FacesContext context) 

    Returns the URL pattern of the javax.faces.webapp.FacesServlet that is executing the current request. If there are multiple URL patterns, the value returned by HttpServletRequest.getServletPath() and HttpServletRequest.getPathInfo() is used to determine which mapping to return.

    If no mapping can be determined, it most likely means that this particular request wasn't dispatched through the javax.faces.webapp.FacesServlet .
 public static FeatureDescriptor getFeatureDescriptor(String name,
    String displayName,
    String desc,
    boolean expert,
    boolean hidden,
    boolean preferred,
    Object type,
    Boolean designTime) 
 public static Object getListenerInstance(ValueExpression type,
    ValueExpression binding) 

    Factory method for creating the varius JSF listener instances that may be referenced by type or binding.

    If binding is not null and the evaluation result is not null return that instance. Otherwise try to instantiate an instances based on type.

 public static Locale getLocaleFromContextOrSystem(FacesContext context) 
 public static Locale getLocaleFromString(String localeStr) throws IllegalArgumentException 
 public static String getStackTraceString(Throwable e) 

    Leverage the Throwable.getStackTrace() method to produce a String version of the stack trace, with a "\n" before each line.

 public static StateManager getStateManager(FacesContext context) throws FacesException 
 public static ViewHandler getViewHandler(FacesContext context) throws FacesException 
 public static int indexOfSet(String str,
    char[] set,
    int fromIndex) 
 public static boolean isCoreTLVActive() 
 public static boolean isHtmlTLVActive() 
 public static boolean isPrefixMapped(String mapping) 

    Returns true if the provided url-mapping is a prefix path mapping (starts with /).

 public static boolean isUnitTestModeEnabled() 
 public static Class loadClass(String name,
    Object fallbackClass) throws ClassNotFoundException 
 public static  void notNull(String varname,
    Object var) 
 public static  void parameterNonEmpty(String param) throws FacesException 
 public static  void parameterNonNull(Object param) throws FacesException 
 public static boolean prefixViewTraversal(FacesContext context,
    UIComponent root,
    Util.TreeTraversalCallback action) throws FacesException 
 public static  void setCoreTLVActive(boolean active) 
 public static  void setHtmlTLVActive(boolean active) 
 public static  void setUnitTestModeEnabled(boolean enabled) 
 public static synchronized String[] split(String toSplit,
    String regex) 

    A slightly more efficient version of String.split() which caches the Patterns in an LRUMap instead of creating a new Pattern on each invocation.