|
Novell exteNd Director 5.2 API |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.sssw.fw.util.EboRequestHelper
HTTP Servlet Request and Portlet Request- related utilities.
Field Summary | |
static String |
BROWSER_AOL
Value for use in equality comparisons for AOL browser |
static String |
BROWSER_LYNX
Value for use in equality comparisons for Lynx browser |
static String |
BROWSER_MAJOR_VER
Value for use in determining comparison target of a Browser's Major Version |
static String |
BROWSER_MINOR_VER
Value for use in determining comparison target of a Browser's Minor Version |
static String |
BROWSER_MOSAIC
Value for use in equality comparisons for NCSA Mosaic browser |
static String |
BROWSER_MSIE
Value for use in equality comparisons for MSIE browser |
static String |
BROWSER_NAME
Value for use in determining comparison target of user agent |
static String |
BROWSER_NETSCAPE
Value for use in equality comparisons for Netscape browser |
static String |
BROWSER_NOKIA
Value for use in equality comparisons for Nokia device |
static String |
BROWSER_OPERA
Value for use in equality comparisons for Opera browser |
static String |
BROWSER_UP
Value for use in equality comparisons for UP Browser |
static String |
CONTENT_SEARCH_DTD
Relative directory path and filename for CM system document meta-data search dtd. |
static String |
CONTEXT_SUBST
Place holder used by methods such as getFullPath() to build the full path up to the context Example: $context$/jsp/PropertySheet.jsp would be parsed and converted to http://host/context/jsp/PropertySheet.jsp |
static String |
PLATFORM
Value for use in determining comparison target of Platform |
static String |
PLATFORM_LINUX
Value for use in equality comparisons for Linux platform |
static String |
PLATFORM_MAC
Value for use in equality comparisons for MAC platform |
static String |
PLATFORM_OS2
Value for use in equality comparisons for OS2 platform |
static String |
PLATFORM_PPC
Value for use in equality comparisons for PPC platform |
static String |
PLATFORM_SUN_OS
Value for use in equality comparisons for Sun OS platform |
static String |
PLATFORM_UNIX_OR_VMS
Value for use in equality comparisons for UNIX/VMS platform |
static String |
PLATFORM_WAP
Value for use in equality comparisons for WAP platform |
static String |
PLATFORM_WIN
Value for use in equality comparisons for Windows platform |
static String |
PLATFORM_X11
Value for use in equality comparisons for X11 platform |
static String |
PORTAL_APPLICATION_DTD
Relative directory path and filename for Portal application dtd. |
static String |
UNKNOWN
Value for use in equality comparisons for Unknown browser |
static String |
USER_AGENT
This class provides utility methods for obtaining information on the browser platform based on the HTTP Servlet Request |
Constructor Summary | |
EboRequestHelper()
|
Method Summary | |
static boolean |
equals(Map browserInfo1,
Map browserInfo2,
int mode)
Check two browser info's for equality. |
static Map |
getBrowserInfo(HttpServletRequest req)
Extract the HTTP user-agent header from the HTTP Servlet Request and parse it out. |
static String |
getFullContextPath(HttpServletRequest req)
Assemble the fully qualified path up to the context of a request Example: http://host:port/context Where context is the silverstream database + / + war context, for SilverStream |
static String |
getFullContextPath(HttpServletRequest req,
String pathInfo)
Assemble the fully qualified path up to the context of a request Example: http://host:port/context Where context is the silverstream database + / + war context, for SilverStream |
static String |
getFullContextPath(javax.portlet.PortletRequest req)
Assemble the fully qualified path up to the context of a portlet request Example: http://host:port/context Where context is the silverstream database + / + war context, for SilverStream |
static String |
getFullContextPath(javax.portlet.PortletRequest req,
String pathInfo)
Assemble the fully qualified path up to the context of a request Example: http://host:port/context Where context is the silverstream database + / + war context, for SilverStream |
static String |
getFullHostPath(HttpServletRequest req)
Gets the full url of the host (port is returned if not the default 80). |
static String |
getFullHostPath(javax.portlet.PortletRequest req)
Gets the full url of the host (port is returned if not the default 80). |
static String |
getFullPath(HttpServletRequest req,
String relativePath)
Build a full URL based on a relative path Example: /$context$/Login --> http://host/context/Login /Login --> http://host/Login http://host/warcontext/servlet/comp/Login --> http://host/warcontext/servlet/comp/Login Login --> Login |
static Map |
parseUserAgent(String userAgent)
Parse out browser information from the User Agent header. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final String USER_AGENT
public static final String BROWSER_NAME
public static final String BROWSER_MAJOR_VER
public static final String BROWSER_MINOR_VER
public static final String PLATFORM
public static final String UNKNOWN
public static final String BROWSER_MSIE
public static final String BROWSER_NETSCAPE
public static final String BROWSER_OPERA
public static final String BROWSER_AOL
public static final String BROWSER_LYNX
public static final String BROWSER_MOSAIC
public static final String BROWSER_UP
public static final String BROWSER_NOKIA
public static final String PLATFORM_WIN
public static final String PLATFORM_X11
public static final String PLATFORM_SUN_OS
public static final String PLATFORM_LINUX
public static final String PLATFORM_MAC
public static final String PLATFORM_PPC
public static final String PLATFORM_OS2
public static final String PLATFORM_UNIX_OR_VMS
public static final String PLATFORM_WAP
public static final String CONTEXT_SUBST
public static final String CONTENT_SEARCH_DTD
public static final String PORTAL_APPLICATION_DTD
Constructor Detail |
public EboRequestHelper()
Method Detail |
public static final Map getBrowserInfo(HttpServletRequest req)
public static Map parseUserAgent(String userAgent)
See Section 14.42 of the HTTP 1.1 spec for more information.
Examples of user agent strings:
User Agent: Mozilla/4.0 (compatible; MSIE 4.01; Windows 98)
User Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT)
User Agent: Mozilla/4.5 (Macintosh; U; PPC)
User Agent: Mozilla/4.7 [en] (WinNT; I)
User Agent: Mozilla/3.0 (compatible; Opera/3.0; Windows 95/NT) 3.1
User Agent: Mozilla/4.03 [la] (X11; I; Linux 2.1.29 i586)
User Agent: Mozilla/2.0 (compatible; AOL 3.0; Mac_PowerPC)
User Agent: NCSA Mosaic/2.6b1 (X11;UNIX_SV 4.2MP R4000) libwww/2.12 modified
User Agent: Lynx/2.7 libwww-FM/2.14
public static boolean equals(Map browserInfo1, Map browserInfo2, int mode)
browserInfo1
- the first infobrowserInfo2
- the second infocheckMajorVersion
- whether to compare major versions in addition to
browser namescheckMinorVersion
- whether to compare minor versions in addition to
browser names and major versionspublic static String getFullContextPath(javax.portlet.PortletRequest req)
req
- the PortletRequest from which the context path should be assembledpublic static String getFullContextPath(HttpServletRequest req)
req
- the HttpServletRequest from which the context path should be assembledpublic static String getFullContextPath(HttpServletRequest req, String pathInfo)
req
- the HttpServletRequest from which the context path should be assembledpathInfo
- a String representing additional path info to be appended
to the assembled pathpublic static String getFullContextPath(javax.portlet.PortletRequest req, String pathInfo)
req
- the PortletRequest from which the context path should be assembledpathInfo
- a String representing additional path info to be appended
to the assembled pathpublic static String getFullPath(HttpServletRequest req, String relativePath)
req
- - the HttpServletRequest from which the context path should be assembledrelativePath
- - the relative path which we'll use to create a full URL pat,hpublic static String getFullHostPath(HttpServletRequest req)
req
- - the HttpServletRequestpublic static String getFullHostPath(javax.portlet.PortletRequest req)
req
- - the PortletRequest
|
Novell exteNd Director 5.2 API |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |