Package de.espirit.firstspirit.module
Interface WebServer
- All Superinterfaces:
Component<WebServerDescriptor,
ServerEnvironment>
Definition of a web server component.
- Since:
- 4.1
-
Method Summary
Modifier and TypeMethodDescriptionvoid
deploy
(@NotNull String webAppName, @NotNull String contextName, @NotNull String targetPath, @NotNull String warFilePath) Deploys the specified war file to the configured web server@NotNull String
getContextPath
(String contextName, String targetPath) Returns the path to the directory of the specified web application relative togetWebAppDir()
.@Nullable String
Returns the internal URL to this web servergetURL()
Returns the URL to this web server@Nullable String
Returns the path to the web application directory of this web serverdefault @Nullable Path
getWebAppDir
(@NotNull String targetPath) Returns the path to a specific web application directory of this web server.boolean
isDeployed
(@NotNull String webAppName, @NotNull String contextName, @NotNull String targetPath) Returns true if the contextName is deployed and false otherwise.boolean
isHidden()
Returns if the web server is hidden (actually only the internal) if true, then its hidden in the web-server configuration...boolean
Returns if the web server supports deployment of web applications.boolean
Returns if the web server supports querying the deployment state of web applications.boolean
Returns if the web server supports undeployment of web applications.void
Undeploys the specified contextMethods inherited from interface de.espirit.firstspirit.module.Component
init, installed, uninstalling, updated
-
Method Details
-
deploy
void deploy(@NotNull @NotNull String webAppName, @NotNull @NotNull String contextName, @NotNull @NotNull String targetPath, @NotNull @NotNull String warFilePath) Deploys the specified war file to the configured web server- Parameters:
contextName
- name of the target context which will be the beginning of all URL paths for the web application. Examples are "/" for the root web-app (Startpage) or "/fs5staging".targetPath
- suggested relative target path to the deployment directory in the filesystem, may be used as fallback in cases where the context name cannot be used. Example: "fs5staging"webAppName
- unique name of the web application, e.g. "fs5root_global"warFilePath
- path to deployable war file- Since:
- 4.1
-
undeploy
void undeploy(@NotNull @NotNull String webAppName, @NotNull @NotNull String contextName, @NotNull @NotNull String targetPath) Undeploys the specified context- Parameters:
contextName
- name of the target context, e.g. "/fs5root"targetPath
- relative target path to the deployment directory in the file system, may be used as fallbackwebAppName
- unique name of the web application, e.g. "fs5root_global"- Since:
- 4.1
-
isDeployed
boolean isDeployed(@NotNull @NotNull String webAppName, @NotNull @NotNull String contextName, @NotNull @NotNull String targetPath) Returns true if the contextName is deployed and false otherwise. If the server does not support querying the deployment state (i.e.supportsDeployState()
isfalse
), this method returns alwaysfalse
.- Parameters:
contextName
- name of the target context, e.g. "/fs5root"webAppName
- unique name of the web application, e.g. "fs5root_global"targetPath
- relative target path to the deployment directory in the file system, may be used as fallback- Returns:
- true if the contextName is deployed and false otherwise
- Since:
- 4.1
-
supportsDeployState
boolean supportsDeployState()Returns if the web server supports querying the deployment state of web applications.- Returns:
- true, if deploy is supported, and false otherwise
- Since:
- 4.1
-
supportsDeploy
boolean supportsDeploy()Returns if the web server supports deployment of web applications.- Returns:
- true, if deploy is supported, and false otherwise
- Since:
- 4.1
-
supportsUndeploy
boolean supportsUndeploy()Returns if the web server supports undeployment of web applications.- Returns:
- true, if undeployment is supported, and false otherwise
- Since:
- 4.1
-
isHidden
boolean isHidden()Returns if the web server is hidden (actually only the internal) if true, then its hidden in the web-server configuration...- Returns:
- Returns if the web server is hidden (actually only the internal)
- Since:
- 4.1
-
getURL
String getURL()Returns the URL to this web server- Returns:
- URL to this web server
- Since:
- 4.1
-
getInternalURL
Returns the internal URL to this web server- Returns:
- internal URL to this web server, may be
null
if not configured. - Since:
- 5.2.709
-
getWebAppDir
Returns the path to the web application directory of this web server- Returns:
- path to the web application directory of this web server or
null
if not available. - Since:
- 4.1
-
getWebAppDir
Returns the path to a specific web application directory of this web server.- Parameters:
targetPath
- target path relative to the web-app base directory returned bygetWebAppDir()
. The path has been initially specified when callingdeploy(String, String, String, String)
.- Returns:
- path to the specific web application directory of this web server or
null
if not available. - Since:
- 5.2.231004
-
getContextPath
Returns the path to the directory of the specified web application relative togetWebAppDir()
. The returned path might differ from the specified target path. For contextName"/"
the return value may be"ROOT"
instead oftargetPath
- Parameters:
contextName
- name of the target context, e.g. "/fs5root"targetPath
- relative target path to the deployment directory in the file system, may be used as fallback- Returns:
- relative target path in the file system, may be used as fallback
- Since:
- 5.2.511
-