@ScannerSide @ServerSide @ComputeEngineSide public abstract class Server extends Object
| Constructor and Description | 
|---|
| Server() | 
| Modifier and Type | Method and Description | 
|---|---|
| abstract String | getContextPath()Context path of web server. | 
| abstract File | getDeployDir()Deprecated. 
 always  nullsince version 6.0. No alternatives, as plugins do not have to touch this directory. | 
| abstract String | getId()Name is misleading, this is an UUID generated
 at each startup, so it changes if server is restarted. | 
| abstract String | getPermanentServerId()UUID generated on demand by system administrators. | 
| abstract String | getPublicRootUrl()Return the public root url, for instance : https://nemo.sonarqube.org. | 
| abstract File | getRootDir()Deprecated. 
 in 6.0. Replaced by  ServerFileSystem.getHomeDir() | 
| abstract Date | getStartedAt()Date when server started | 
| abstract String | getURL() | 
| abstract String | getVersion()Non-null version of SonarQube at runtime | 
| abstract boolean | isDev()The dev mode is enabled when the property  sonar.web.devistrue. | 
| abstract boolean | isSecured()Deprecated. 
 since 5.6, use instead  HttpServletRequest.getHeader(String)and check that X-Forwarded-Proto header is set to "https". | 
public Server()
public abstract String getId()
@CheckForNull public abstract String getPermanentServerId()
null by default on fresh installations. When defined,
 value does not change when server is restarted.public abstract String getVersion()
public abstract Date getStartedAt()
@Deprecated public abstract File getRootDir()
ServerFileSystem.getHomeDir()null in scanner.@Deprecated @CheckForNull public abstract File getDeployDir()
null since version 6.0. No alternatives, as plugins do not have to touch this directory.public abstract String getContextPath()
"" by default. When defined by
 the property sonar.web.context of conf/sonar.properties, then value starts but does
 not end with slash '/', for instance "/sonarqube".public abstract String getPublicRootUrl()
CoreProperties.SERVER_BASE_URL_DEFAULT_VALUEpublic abstract boolean isDev()
sonar.web.dev is true.@Deprecated public abstract boolean isSecured()
HttpServletRequest.getHeader(String) and check that X-Forwarded-Proto header is set to "https".Copyright © 2009–2016 SonarSource. All rights reserved.