| java.lang.Object com.opensymphony.module.sitemesh.mapper.AbstractDecoratorMapper com.opensymphony.module.sitemesh.mapper.OSDecoratorMapper
OSDecoratorMapper | public class OSDecoratorMapper extends AbstractDecoratorMapper (Code) | | The OSDecoratorMapper will map a suitable decorator based on the operating system
of the remote client.
OSDecoratorMapper works by checking to see if the "UA-OS" header
was sent with the HTTP request. If it was, the class will check the
value of the header with all the different os's the user has configured
the Decorator Mapper to identify and, if a match is found, routes the
request accordingly. Configuration is done using the sitemesh.xml file.
The param name is a string literal (operating system name) you would like
to match in the UA-OS header, and the value is what will be appended to the
decorator name if the user is using that operating system
author: Adam P. Schepis version: $Revision: 1.3 $ See Also: com.opensymphony.module.sitemesh.mapper.AbstractDecoratorMapper |
Field Summary | |
protected Properties | properties Properties holds the parameters that the object was initialized with. |
properties | protected Properties properties(Code) | | Properties holds the parameters that the object was initialized with.
|
getDecorator | public Decorator getDecorator(HttpServletRequest request, Page page)(Code) | | Attempts to find the correct decorator for Page page based on
the UA-OS HTTP header in the request.
Parameters: request - The HTTP request sent to the server Parameters: page - The page SiteMesh is trying to find a decorator for A Decorator object that is either the decorator for the identifiedOS, or the parent DecoratorMapper's decorator |
init | public void init(Config config, Properties properties, DecoratorMapper parent) throws java.lang.InstantiationException(Code) | | Init initializes the OSDecoratorMapper object by setting the parent
DecoratorMapper, and loading the initialization properties.
Parameters: config - The config file Parameters: properties - An object containing intialization parameters Parameters: parent - The parent DecoratorMapper object |
|
|