Package sonia.scm.web
Class UserAgent
java.lang.Object
sonia.scm.web.UserAgent
The software agent that is acting on behalf of a user. The user agent
represents a browser or one of the repository client (svn, git or hg).
- Since:
- 1.45
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic UserAgent.Builderstatic UserAgent.BuilderDeprecated.booleanReturns theCharset, which is used to decode the basic authentication header.getName()Returns the name of UserAgent.inthashCode()booleanReturnstrueif UserAgent is a browser.booleanReturnstrueif UserAgent is an scm client (e.g.static UserAgent.Builderstatic UserAgent.BuildertoString()
-
Method Details
-
builder
Deprecated.Returns theUserAgent.Builderfor the UserAgent.- Parameters:
name- name of the UserAgent- Returns:
- builder for UserAgent
-
browser
-
scmClient
-
other
-
equals
-
hashCode
public int hashCode() -
toString
-
getBasicAuthenticationCharset
Returns theCharset, which is used to decode the basic authentication header.- Returns:
Charsetfor basic authentication
-
getName
Returns the name of UserAgent.- Returns:
- name of UserAgent
-
isBrowser
public boolean isBrowser()Returnstrueif UserAgent is a browser. -
isScmClient
public boolean isScmClient()Returnstrueif UserAgent is an scm client (e.g. git, svn or hg).- Returns:
trueif UserAgent is an scm client
-
browser(String),scmClient(String)orother(String)instead