atg.servlet
Class BrowserType

java.lang.Object
  extended by atg.servlet.BrowserType
All Implemented Interfaces:
java.io.Serializable

public class BrowserType
extends java.lang.Object
implements java.io.Serializable

A class that defines a single browser type, like "java", "javascript", etc. Each browser type has a name and a list of matching patterns.

See Also:
Serialized Form

Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Constructor Summary
BrowserType()
           
 
Method Summary
 java.util.List<java.util.regex.Pattern> getCompiledPatterns()
          List of compiled regular expressions.
 java.lang.String getDisplayName()
          Return the display name.
 java.lang.String getDisplayNameResource()
           
 java.lang.String getName()
          Returns the value of the name property
 java.lang.String[] getPatterns()
          Returns the value of the patterns property
 java.lang.String[] getRegexPatterns()
          The array of regular expression patterns.
 void setDisplayName(java.lang.String pDisplayName)
          Sets the property DisplayName.
 void setDisplayNameResource(java.lang.String pDisplayNameResource)
          Sets the property DisplayNameResource.
 void setName(java.lang.String pName)
          Sets the name of this browser type.
 void setPatterns(java.lang.String[] pPatterns)
          Sets the patterns of "user-agent" that match this browser type.
 void setRegexPatterns(java.lang.String[] pRegexPatterns)
          The array of regular expression patterns.
 java.lang.String toString()
          Returns the String representation consisting of a list of the patterns
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string

Constructor Detail

BrowserType

public BrowserType()
Method Detail

getCompiledPatterns

public java.util.List<java.util.regex.Pattern> getCompiledPatterns()
List of compiled regular expressions. This method is not thread safe with the setting of regexPatterns.

Returns:
the compiledPatterns

getRegexPatterns

public java.lang.String[] getRegexPatterns()
The array of regular expression patterns. This will supersede any patterns set in the 'patterns' property.

Returns:
the regexPatterns

setRegexPatterns

public void setRegexPatterns(java.lang.String[] pRegexPatterns)
The array of regular expression patterns. This will supersede any patterns set in the 'patterns' property.

Parameters:
pRegexPatterns - the array of regular expression patterns to set

setName

public void setName(java.lang.String pName)
Sets the name of this browser type. Names are case sensitive.


getName

public java.lang.String getName()
Returns the value of the name property


setDisplayName

public void setDisplayName(java.lang.String pDisplayName)
Sets the property DisplayName. This is the name displayed for this type in a user interface.


getDisplayName

public java.lang.String getDisplayName()
Return the display name. If a localized version has been defined return that.

Returns:
The value of the display name.

setDisplayNameResource

public void setDisplayNameResource(java.lang.String pDisplayNameResource)
Sets the property DisplayNameResource. This is used to retrieve a localized name displayed for this type in a user interface.


getDisplayNameResource

public java.lang.String getDisplayNameResource()
Returns:
The value of the property DisplayNameResource.

setPatterns

public void setPatterns(java.lang.String[] pPatterns)
Sets the patterns of "user-agent" that match this browser type. These patterns are strings using simple regular expressions.


getPatterns

public java.lang.String[] getPatterns()
Returns the value of the patterns property


toString

public java.lang.String toString()
Returns the String representation consisting of a list of the patterns

Overrides:
toString in class java.lang.Object