Package jmri.server.web
Class DefaultWebServerConfiguration
- java.lang.Object
-
- jmri.server.web.AbstractWebServerConfiguration
-
- jmri.server.web.DefaultWebServerConfiguration
-
- All Implemented Interfaces:
WebServerConfiguration
public final class DefaultWebServerConfiguration extends AbstractWebServerConfiguration
Default implementation ofWebServerConfiguration
. This implementation reads two properties files to build the JMRI default configuration for the Web Server. Default forbidden paths are listed in the WebServlet annotation forDenialServlet
.
-
-
Constructor Summary
Constructors Constructor Description DefaultWebServerConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.HashMap<java.lang.String,java.lang.String>
getFilePaths()
Get paths that are to be returned by the web server as individual files or directory listings.java.util.HashMap<java.lang.String,java.lang.String>
getRedirectedPaths()
Get paths that are to redirected by the web server.-
Methods inherited from class jmri.server.web.AbstractWebServerConfiguration
getForbiddenPaths
-
-
-
-
Constructor Detail
-
DefaultWebServerConfiguration
public DefaultWebServerConfiguration()
-
-
Method Detail
-
getFilePaths
@Nonnull public java.util.HashMap<java.lang.String,java.lang.String> getFilePaths()
Description copied from interface:WebServerConfiguration
Get paths that are to be returned by the web server as individual files or directory listings. Note that all files or directories listed must be in theFileUtil.PREFERENCES
,FileUtil.PROFILE
,FileUtil.SETTINGS
, orFileUtil.PROGRAM
JMRI portable path.- Specified by:
getFilePaths
in interfaceWebServerConfiguration
- Overrides:
getFilePaths
in classAbstractWebServerConfiguration
- Returns:
- a map containing the web path as the key, and the path on disk as the value; return an empty map if none
-
getRedirectedPaths
@Nonnull public java.util.HashMap<java.lang.String,java.lang.String> getRedirectedPaths()
Description copied from interface:WebServerConfiguration
Get paths that are to redirected by the web server.- Specified by:
getRedirectedPaths
in interfaceWebServerConfiguration
- Overrides:
getRedirectedPaths
in classAbstractWebServerConfiguration
- Returns:
- a map containing the request path as the key and the path to redirect to as the value; return an empty map if none
-
-