com.filenet.wcm.toolkit.server.util
Class UserAgent
- java.lang.Object
com.filenet.wcm.toolkit.server.util.UserAgent
- public class UserAgent
- extends java.lang.Object
Field Summary
| Modifier and Type | Field and Description |
|---|---|
|
activeXBrowserMap
|
|
activeXOSMap
|
|
addsExtraLinefeeds
|
|
addsExtraLinefeedsMap
|
|
agentCache
|
|
calendarWorkaroundIE
|
|
calendarWorkaroundMap
|
|
encodedFilenameMap
|
|
inputTypeFileMap
|
|
name
|
|
osName
|
|
osVersion
|
|
recognizedBrowsers
|
|
rfc2231Map
|
|
rName
|
|
rVersion
|
|
supportsActiveX
|
|
supportsEncodedFilename
|
|
supportsInputTypeFile
|
|
supportsRFC2231
|
|
tokens
|
|
useAttachmentHeader
|
|
useAttachmentMap
|
|
USER_AGENT
|
|
version
|
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
addsExtraLinefeeds()
|
|
compareVersions(java.lang.String version1,java.lang.String version2)
Compare version strings.
|
|
getName()
Returns the identified browser's name.
|
|
getUserAgent(javax.servlet.http.HttpServletRequest request)
Static factory convenience signature that thakes the request object as input.
|
|
getUserAgent(java.lang.String userAgentHeader)
Static factory method.
|
|
getVersion()
Returns the identified browser's version String.
|
|
hasActiveXSupport()
Returns true if the client machine's operating system and browser
type/version are the proper type to support File Tracking through
the Workplace FileTracker Active-X control
|
|
hasEncodedFilenameSupport()
Returns true if the browser can accept a URL/UTF-8 encoded filename interchangeably with a clear text
filename in the Content-Disposition header.
|
|
hasInputTypeFileSupport()
|
|
hasRFC2231Support()
Returns true if the browser supports rfc2231 Content-Disposition headers.
|
|
initialize(java.lang.String userAgent)
Initializes the UserAgent object.
|
|
needsCalendarTabWorkaround()
|
|
setFlags()
Configure all of the boolean flags in this object.
|
|
useAttachmentHeader()
Tells whether or not to ALWAYS use the "attachment" keyword in the Content-Disposition header at all times.
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail
USER_AGENT
- public static final java.lang.String USER_AGENT
See Also:
agentCache
- protected static java.util.Map agentCache
recognizedBrowsers
- protected static java.util.Set recognizedBrowsers
rfc2231Map
- protected static java.util.Map rfc2231Map
encodedFilenameMap
- protected static java.util.Map encodedFilenameMap
addsExtraLinefeedsMap
- protected static java.util.Map addsExtraLinefeedsMap
inputTypeFileMap
- protected static java.util.Map inputTypeFileMap
calendarWorkaroundMap
- protected static java.util.Map calendarWorkaroundMap
useAttachmentMap
- protected static java.util.Map useAttachmentMap
activeXBrowserMap
- protected static java.util.Map activeXBrowserMap
activeXOSMap
- protected static java.util.Map activeXOSMap
tokens
- protected java.util.List tokens
name
- protected java.lang.String name
version
- protected java.lang.String version
rName
- protected java.lang.String rName
rVersion
- protected java.lang.String rVersion
osName
- protected java.lang.String osName
osVersion
- protected java.lang.String osVersion
supportsRFC2231
- protected boolean supportsRFC2231
supportsEncodedFilename
- protected boolean supportsEncodedFilename
addsExtraLinefeeds
- protected boolean addsExtraLinefeeds
supportsInputTypeFile
- protected boolean supportsInputTypeFile
calendarWorkaroundIE
- protected boolean calendarWorkaroundIE
supportsActiveX
- protected boolean supportsActiveX
useAttachmentHeader
- protected boolean useAttachmentHeader
Method Detail
getUserAgent
- public static UserAgent getUserAgent( javax.servlet.http.HttpServletRequest request)
Static factory convenience signature that thakes the request object as input.
Parameters:
request - Returns:
getUserAgent
- public static UserAgent getUserAgent( java.lang.String userAgentHeader)
Static factory method.
Parameters:
userAgentHeader - Returns:
getName
- public java.lang.String getName( )
Returns the identified browser's name.
Returns:
getVersion
- public java.lang.String getVersion( )
Returns the identified browser's version String.
Returns:
hasRFC2231Support
- public boolean hasRFC2231Support( )
Returns true if the browser supports rfc2231 Content-Disposition headers. This is a standard
for encoding extended characters.
Returns:
hasEncodedFilenameSupport
- public boolean hasEncodedFilenameSupport( )
Returns true if the browser can accept a URL/UTF-8 encoded filename interchangeably with a clear text
filename in the Content-Disposition header. There is no RFC standard associated with this behavior.
Returns:
hasInputTypeFileSupport
- public boolean hasInputTypeFileSupport( )
needsCalendarTabWorkaround
- public boolean needsCalendarTabWorkaround( )
addsExtraLinefeeds
- public boolean addsExtraLinefeeds( )
hasActiveXSupport
- public boolean hasActiveXSupport( )
Returns true if the client machine's operating system and browser
type/version are the proper type to support File Tracking through
the Workplace FileTracker Active-X control
Returns:
useAttachmentHeader
- public boolean useAttachmentHeader( )
Tells whether or not to ALWAYS use the "attachment" keyword in the Content-Disposition header at all times.
Reference defect ecmdb00854172
Returns:
initialize
- protected void initialize(java.lang.String userAgent)
Initializes the UserAgent object. This is the workhorse for the constructors.
Parameters:
userAgent - setFlags
- protected void setFlags()
Configure all of the boolean flags in this object.
compareVersions
- protected int compareVersions(java.lang.String version1,
- java.lang.String version2)
Compare version strings. This method assumes version strings consisting
of one or more numeric parts separated by periods (dots).
If for some reason a particular part cannot be interpreted as an integer
value, then the parts are compared as strings.
Parameters:
version1 - version2 - Returns:
Returns 0 if version1 and version2 are equal, 1 if version1 is greater and -1 if version1 is less.