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.Builder
static UserAgent.Builder
Deprecated.boolean
Returns theCharset
, which is used to decode the basic authentication header.getName()
Returns the name of UserAgent.int
hashCode()
boolean
Returnstrue
if UserAgent is a browser.boolean
Returnstrue
if UserAgent is an scm client (e.g.static UserAgent.Builder
static UserAgent.Builder
toString()
-
Method Details
-
builder
Deprecated.Returns theUserAgent.Builder
for 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:
Charset
for basic authentication
-
getName
Returns the name of UserAgent.- Returns:
- name of UserAgent
-
isBrowser
public boolean isBrowser()Returnstrue
if UserAgent is a browser. -
isScmClient
public boolean isScmClient()Returnstrue
if UserAgent is an scm client (e.g. git, svn or hg).- Returns:
true
if UserAgent is an scm client
-
browser(String)
,scmClient(String)
orother(String)
instead