com.openedit.web
Class Browser

java.lang.Object
  extended by com.openedit.web.Browser

public class Browser
extends java.lang.Object

This interface represents a particular type of browser.

Author:
cburkey

Field Summary
static int CHROME_BROWSER
           
static int GECKO_BROWSER
           
static int IE_EDIT_WIDTH
           
static int MOZILLA_EDIT_WIDTH
           
static int MSIE_BROWSER
           
static int NETSCAPE_BROWSER
           
static int OPERA_BROWSER
           
static int SAFARI_BROWSER
           
static int SAFARI_IPAD_BROWSER
           
static int TEXT_BROWSER
           
static int UNKNOWN_BROWSER
           
 
Constructor Summary
Browser(java.lang.String inUserAgent)
           
 
Method Summary
 int getBrowserType()
          Retrieve the browser type.
 java.lang.String getCookieListing()
           
 int getEditWidth()
           
 javax.servlet.http.HttpServletRequest getHttpServletRequest()
           
 java.util.Locale getLocale()
           
 java.lang.String getMajorVersion()
          Retrieve the major version (if one could be found).
 java.lang.String getMinorVersion()
          Retrieve the minor version (if one could be found).
 java.lang.String getUserAgent()
          Retrieve the user agent string that we used to determine the information in this browser.
 java.lang.String getVersion()
          Retrieve the browser version.
 boolean isGecko()
          Determine whether the browser is a Mozilla derivative (including Netscape 6 and 7).
 boolean isHtml5VideoOnly()
           
 boolean isMSIE()
          Determine if the browser is a Microsoft browser.
 boolean isXMLEditorCompatible()
          FIXME: This is a temporary method needed because Velocity can't handle static fields (it would seem).
 void setHttpServletRequest(javax.servlet.http.HttpServletRequest inHttpServletRequest)
           
 void setLocale(java.util.Locale inLocale)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNKNOWN_BROWSER

public static final int UNKNOWN_BROWSER
See Also:
Constant Field Values

MSIE_BROWSER

public static final int MSIE_BROWSER
See Also:
Constant Field Values

GECKO_BROWSER

public static final int GECKO_BROWSER
See Also:
Constant Field Values

NETSCAPE_BROWSER

public static final int NETSCAPE_BROWSER
See Also:
Constant Field Values

CHROME_BROWSER

public static final int CHROME_BROWSER
See Also:
Constant Field Values

SAFARI_BROWSER

public static final int SAFARI_BROWSER
See Also:
Constant Field Values

SAFARI_IPAD_BROWSER

public static final int SAFARI_IPAD_BROWSER
See Also:
Constant Field Values

OPERA_BROWSER

public static final int OPERA_BROWSER
See Also:
Constant Field Values

TEXT_BROWSER

public static final int TEXT_BROWSER
See Also:
Constant Field Values

IE_EDIT_WIDTH

public static final int IE_EDIT_WIDTH
See Also:
Constant Field Values

MOZILLA_EDIT_WIDTH

public static final int MOZILLA_EDIT_WIDTH
See Also:
Constant Field Values
Constructor Detail

Browser

public Browser(java.lang.String inUserAgent)
Method Detail

getBrowserType

public int getBrowserType()
Retrieve the browser type.

Returns:
One of the BROWSER constants

isMSIE

public boolean isMSIE()
Determine if the browser is a Microsoft browser.

Returns:

getMajorVersion

public java.lang.String getMajorVersion()
Retrieve the major version (if one could be found).

Returns:

getMinorVersion

public java.lang.String getMinorVersion()
Retrieve the minor version (if one could be found).

Returns:

isGecko

public boolean isGecko()
Determine whether the browser is a Mozilla derivative (including Netscape 6 and 7).

Returns:

isHtml5VideoOnly

public boolean isHtml5VideoOnly()

getUserAgent

public java.lang.String getUserAgent()
Retrieve the user agent string that we used to determine the information in this browser.

Returns:

getVersion

public java.lang.String getVersion()
Retrieve the browser version.

Returns:

isXMLEditorCompatible

public boolean isXMLEditorCompatible()
FIXME: This is a temporary method needed because Velocity can't handle static fields (it would seem). This should disappear when we fix bug WSP35.

Returns:

getEditWidth

public int getEditWidth()

getLocale

public java.util.Locale getLocale()

setLocale

public void setLocale(java.util.Locale inLocale)

getCookieListing

public java.lang.String getCookieListing()

getHttpServletRequest

public javax.servlet.http.HttpServletRequest getHttpServletRequest()

setHttpServletRequest

public void setHttpServletRequest(javax.servlet.http.HttpServletRequest inHttpServletRequest)