Class PropertiesWebMap

java.lang.Object
org.bzdev.ejws.WebMap
org.bzdev.ejws.maps.PropertiesWebMap
All Implemented Interfaces:
WebMap.ColorSpec

public class PropertiesWebMap extends WebMap implements 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.
  • Constructor Details

  • Method Details

    • getColor

      public String getColor()
      Description copied from interface: WebMap.ColorSpec
      Get the foreground color to use for HTML pages.
      Specified by:
      getColor in interface WebMap.ColorSpec
      Returns:
      the CSS color for the foreground
    • getBackgroundColor

      public String getBackgroundColor()
      Description copied from interface: WebMap.ColorSpec
      Get the background color to use for HTML pages.
      Specified by:
      getBackgroundColor in interface WebMap.ColorSpec
      Returns:
      the CSS color for the background
    • getLinkColor

      public String getLinkColor()
      Description copied from interface: WebMap.ColorSpec
      Get the color to use for unvisited links.
      Specified by:
      getLinkColor in interface WebMap.ColorSpec
      Returns:
      the CSS color for links
    • getVisitedColor

      public String getVisitedColor()
      Description copied from interface: WebMap.ColorSpec
      Get the color to use for visited links.
      Specified by:
      getVisitedColor in interface WebMap.ColorSpec
      Returns:
      the CSS color for visited links
    • setProperties

      public void setProperties(Properties properties)
      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 the Properties instance 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:
      getInfoFromPath in class WebMap
      Parameters:
      prepath - the initial portion of the request URI - the part before the path portion of the URI
      epath - the relative path to the resource
      query - the query portion of the request URI
      fragment - the fragment portion of the request URI
      requestInfo - 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