java.lang.Object
org.bzdev.ejws.WebMap
org.bzdev.ejws.maps.ResourceWebMap
- All Implemented Interfaces:
WebMap.ColorSpec
WebMap for resources accessible from the application's class path.
The sole argument to the constructor is a system resource name to which
a request URI's path, excluding the prefix, will be appended.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.bzdev.ejws.WebMap
WebMap.ColorSpec, WebMap.Info, WebMap.RequestInfo
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the background color to use for HTML pages.getColor()
Get the foreground color to use for HTML pages.protected WebMap.Info
getInfoFromPath
(String prepath, String path, String query, String fragment, WebMap.RequestInfo requestInfo) Get an Info object for a resource.Get the color to use for unvisited links.Get the color to use for visited links.Methods inherited from class org.bzdev.ejws.WebMap
acceptsMethod, addErrorEntry, addGzipSuffix, addMapping, addPageEncoding, addPageEncoding, addWelcome, allowsQuery, asHeaderOps, configure, deconfigure, getContentTypeFromURL, getDisplayDir, getEmap, getEncodingFromURL, getErrorBackgroundColor, getErrorForegroundColor, getErrorInfo, getErrorInfo, getErrorInfo, getFromHeader, getInfo, getInfo, getInfo, getInfo, getInfo, getInfoFromPath, getMimeType, getSuffixToMimeTypeMap, getWebInfHidden, getWebxml, getWelcomeInfo, getWelcomeInfo, getWelcomeList, gzipPaths, newInstance, newInstance, setAllowsQuery, setDisplayDir, setErrorColors, setMethods, setWebInfHidden, stripGZipSuffix, welcomeInfoAvailable
-
Constructor Details
-
ResourceWebMap
Constructor.- Parameters:
root
- the initial portion of a resource name (if it does not end in a '/', a '/' will be appended automatically) or an instance ofResourceWebMap.Config
.- Throws:
IOException
- if an IO error ocurredIllegalArgumentException
- if the argumnent is not a string and not the value null
-
-
Method Details
-
getColor
Description copied from interface:WebMap.ColorSpec
Get the foreground color to use for HTML pages.- Specified by:
getColor
in interfaceWebMap.ColorSpec
- Returns:
- the CSS color for the foreground
-
getBackgroundColor
Description copied from interface:WebMap.ColorSpec
Get the background color to use for HTML pages.- Specified by:
getBackgroundColor
in interfaceWebMap.ColorSpec
- Returns:
- the CSS color for the background
-
getLinkColor
Description copied from interface:WebMap.ColorSpec
Get the color to use for unvisited links.- Specified by:
getLinkColor
in interfaceWebMap.ColorSpec
- Returns:
- the CSS color for links
-
getVisitedColor
Description copied from interface:WebMap.ColorSpec
Get the color to use for visited links.- Specified by:
getVisitedColor
in interfaceWebMap.ColorSpec
- Returns:
- the CSS color for visited links
-
getInfoFromPath
protected WebMap.Info getInfoFromPath(String prepath, String path, String query, String fragment, WebMap.RequestInfo requestInfo) Get an Info object for a resource. Only the path component is used.- Specified by:
getInfoFromPath
in classWebMap
- Parameters:
prepath
- the initial portion of the request URI - the part before the path portion of the URIpath
- the relative path to the resourcequery
- the query portion of the request URIfragment
- the fragment portion of the request URIrequestInfo
- an object encapsulating request data (headers, input streams, etc.)- Returns:
- an Info object describing properties of a resource and providing an input stream to the resource
-