org.openfaces.util
Class Environment

java.lang.Object
  extended by org.openfaces.util.Environment

public class Environment
extends java.lang.Object


Method Summary
static boolean isAjax4jsfRequest()
           
static boolean isBrowser(java.lang.String browserName)
           
static boolean isChrome()
           
static boolean isExoPortal()
           
static boolean isExplorer()
           
static boolean isExplorer6()
           
static boolean isFacelets(javax.faces.context.FacesContext context)
           
static boolean isLiferay(java.util.Map requestMap)
           
static boolean isMozilla()
           
static boolean isMozillaFF2(javax.faces.context.FacesContext context)
           
static boolean isMozillaXhtmlPlusXmlContentType(javax.faces.context.FacesContext context)
           
static boolean isMyFaces()
           
static boolean isOpera()
           
static boolean isRI()
           
static boolean isRichFacesStateManager(javax.faces.application.StateManager stateManager)
           
static boolean isSafari()
           
static boolean isUndefinedBrowser()
          Browser cannot be detected under certain configurations (such as Liferay Portal).
static boolean isXhtmlPlusXmlContentType(javax.faces.context.FacesContext context)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isLiferay

public static boolean isLiferay(java.util.Map requestMap)

isRI

public static boolean isRI()

isFacelets

public static boolean isFacelets(javax.faces.context.FacesContext context)

isMyFaces

public static boolean isMyFaces()

isAjax4jsfRequest

public static boolean isAjax4jsfRequest()

isRichFacesStateManager

public static boolean isRichFacesStateManager(javax.faces.application.StateManager stateManager)

isExoPortal

public static boolean isExoPortal()

isExplorer

public static boolean isExplorer()

isExplorer6

public static boolean isExplorer6()

isMozilla

public static boolean isMozilla()

isOpera

public static boolean isOpera()

isSafari

public static boolean isSafari()

isChrome

public static boolean isChrome()

isXhtmlPlusXmlContentType

public static boolean isXhtmlPlusXmlContentType(javax.faces.context.FacesContext context)

isMozillaXhtmlPlusXmlContentType

public static boolean isMozillaXhtmlPlusXmlContentType(javax.faces.context.FacesContext context)

isUndefinedBrowser

public static boolean isUndefinedBrowser()
Browser cannot be detected under certain configurations (such as Liferay Portal). So we should provide decent behavior even in such situations.

Returns:
true, when the browser cannot be detected due to specific configuration (e.g. Liferay Portal doesn't allow retrieving user-agent). Note that this doesn't mean that the request comes from the unsupported browser.

isBrowser

public static boolean isBrowser(java.lang.String browserName)

isMozillaFF2

public static boolean isMozillaFF2(javax.faces.context.FacesContext context)


Copyright © 1998-2010 TeamDev Ltd. All Rights Reserved.