Package org.uberfire.backend.server
Class WebAppSettings
- java.lang.Object
-
- org.uberfire.backend.server.WebAppSettings
-
public class WebAppSettings extends Object
It holds some settings regarding the WebApp execution context like, for instance, the home directory where the webapp has been deployed.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringformatDirectory(String dir)Format a directory according to the file system separatorstatic WebAppSettingsget()PathgetAbsolutePath(String... relativePath)Calculate the absolute path of a directory placed under the the webapp's directory structure.StringgetRootDir()Retrieve the webapp's root directory => The directory where the container deploys the WAR content.voidsetRootDir(String dir)Overwrites the webapp's root directory.
-
-
-
Method Detail
-
get
public static WebAppSettings get()
-
formatDirectory
protected String formatDirectory(String dir)
Format a directory according to the file system separator
-
getRootDir
public String getRootDir()
Retrieve the webapp's root directory => The directory where the container deploys the WAR content.- Returns:
- An absolute path.
-
setRootDir
public void setRootDir(String dir)
Overwrites the webapp's root directory.This method is only intended to be called at bootstrap time by the
WebAppListener. Changing the root directory may cause the webapp to severely fail.
-
-