pulse - the web application framework Get pulse at SourceForge.net. Fast, secure and Free Open Source software downloads Ohloh project report for pulse-java

org.torweg.pulse.component.statistics.model
Class UserAgent

java.lang.Object
  extended by org.torweg.pulse.util.entity.AbstractBasicEntity
      extended by org.torweg.pulse.util.entity.AbstractNamedEntity
          extended by org.torweg.pulse.component.statistics.model.AbstractRegexVersioned
              extended by org.torweg.pulse.component.statistics.model.UserAgent
All Implemented Interfaces:
java.io.Serializable, INamed

@Entity
public class UserAgent
extends AbstractRegexVersioned

Represents an user-agent.

Version:
$Revision: 1620 $
Author:
Daniel Dietz
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.torweg.pulse.component.statistics.model.AbstractRegexVersioned
UNKNOWN
 
Constructor Summary
protected UserAgent()
          Deprecated. 
  UserAgent(java.lang.String cat, java.lang.String n, java.lang.String reg)
          Creates a new UserAgent with the given category, display name and regular expression.
 
Method Summary
static UserAgent unknown()
          Returns the default UserAgent for representing a unknown user-agent within the website statistics.
 
Methods inherited from class org.torweg.pulse.component.statistics.model.AbstractRegexVersioned
addVersion, getCategory, getRegex, getVersion, getVersions, isMatch, isUnknown, setCategory, setName, setRegex, toString
 
Methods inherited from class org.torweg.pulse.util.entity.AbstractNamedEntity
getName
 
Methods inherited from class org.torweg.pulse.util.entity.AbstractBasicEntity
compareTo, equals, getFullQualifiedClassNameJAXB, getId, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UserAgent

@Deprecated
protected UserAgent()
Deprecated. 

Default constructor.


UserAgent

public UserAgent(java.lang.String cat,
                 java.lang.String n,
                 java.lang.String reg)
Creates a new UserAgent with the given category, display name and regular expression.

Parameters:
cat - the name of the category
n - the default display name
reg - the default regular expression
Throws:
java.lang.IllegalArgumentException -
  • if the given category is null or empty string
  • if the given name is null or empty string
  • if the given regular expression is null or empty string
Method Detail

unknown

public static final UserAgent unknown()
Returns the default UserAgent for representing a unknown user-agent within the website statistics.

Returns:
the default "unknown" UserAgent