java.lang.Object
org.bzdev.ejws.WebMap
org.bzdev.ejws.maps.PropertiesWebMap
- All Implemented Interfaces:
WebMap.ColorSpec
WebMap for resources in a
Properties object.
The sole argument to a PpropertyWebMap's constructor is a
Properties instance whose keys are path
names or a PropertiesWebMap.Config providing a
Properties instance as its first argument.
The value associated with a property's name is the object that
should be be provided by the map.-
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.InfogetInfoFromPath(String prepath, String epath, 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.voidsetProperties(Properties properties) Set this opject's properties.voidupdate()Reinitialize the state of this object.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, setAdminAlias, setAllowsQuery, setDisplayDir, setErrorColors, setLoginAlias, setLoginAlias, setLoginAlias, setLoginAlias, setLoginAlias, setLogoutAlias, setMethods, setWebInfHidden, stripGZipSuffix, welcomeInfoAvailable
-
Constructor Details
-
PropertiesWebMap
Constructor.- Parameters:
properties- aPropertiesinstance or an instance ofPropertiesWebMap.Config- Throws:
IllegalArgumentException
-
-
Method Details
-
getColor
Description copied from interface:WebMap.ColorSpecGet the foreground color to use for HTML pages.- Specified by:
getColorin interfaceWebMap.ColorSpec- Returns:
- the CSS color for the foreground
-
getBackgroundColor
Description copied from interface:WebMap.ColorSpecGet the background color to use for HTML pages.- Specified by:
getBackgroundColorin interfaceWebMap.ColorSpec- Returns:
- the CSS color for the background
-
getLinkColor
Description copied from interface:WebMap.ColorSpecGet the color to use for unvisited links.- Specified by:
getLinkColorin interfaceWebMap.ColorSpec- Returns:
- the CSS color for links
-
getVisitedColor
Description copied from interface:WebMap.ColorSpecGet the color to use for visited links.- Specified by:
getVisitedColorin interfaceWebMap.ColorSpec- Returns:
- the CSS color for visited links
-
setProperties
Set this opject's properties.- Parameters:
properties- the properties
-
update
public void update()Reinitialize the state of this object. This method should be called if thePropertiesinstance passed to this object's constructor is modified. are modified. -
getInfoFromPath
protected WebMap.Info getInfoFromPath(String prepath, String epath, String query, String fragment, WebMap.RequestInfo requestInfo) Get an Info object for a resource. Only the path component is used.- Specified by:
getInfoFromPathin classWebMap- Parameters:
prepath- the initial portion of the request URI - the part before the path portion of the URIepath- 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
-