Class ConfigDecoratorMapper
java.lang.Object
com.opensymphony.module.sitemesh.mapper.AbstractDecoratorMapper
com.opensymphony.module.sitemesh.mapper.ConfigDecoratorMapper
- All Implemented Interfaces:
DecoratorMapper
- Direct Known Subclasses:
EnvEntryDecoratorMapper
Default implementation of DecoratorMapper. Reads decorators and mappings from the
config property
(default '/WEB-INF/decorators.xml').- Author:
- Joe Walnes, Mike Cannon-Brookes
- See Also:
-
Field Summary
Fields inherited from class com.opensymphony.module.sitemesh.mapper.AbstractDecoratorMapper
config, parent -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetDecorator(javax.servlet.http.HttpServletRequest request, Page page) RetrieveDecoratorbased on 'pattern' tag.getNamedDecorator(javax.servlet.http.HttpServletRequest request, String name) Retrieve Decorator named in 'name' attribute.voidinit(Config config, Properties properties, DecoratorMapper parent) Create new ConfigLoader using '/WEB-INF/decorators.xml' file.
-
Constructor Details
-
ConfigDecoratorMapper
public ConfigDecoratorMapper()
-
-
Method Details
-
init
public void init(Config config, Properties properties, DecoratorMapper parent) throws InstantiationException Create new ConfigLoader using '/WEB-INF/decorators.xml' file.- Specified by:
initin interfaceDecoratorMapper- Overrides:
initin classAbstractDecoratorMapper- Parameters:
config- Config supplied by Servlet or Filter.properties- Any initialization properties (specific to implementation).parent- the parent- Throws:
InstantiationException- the instantiation exception
-
getDecorator
RetrieveDecoratorbased on 'pattern' tag.- Specified by:
getDecoratorin interfaceDecoratorMapper- Overrides:
getDecoratorin classAbstractDecoratorMapper- Parameters:
request- the requestpage- the page- Returns:
- the decorator
-
getNamedDecorator
Retrieve Decorator named in 'name' attribute. Checks the role if specified.- Specified by:
getNamedDecoratorin interfaceDecoratorMapper- Overrides:
getNamedDecoratorin classAbstractDecoratorMapper- Parameters:
request- the requestname- the name- Returns:
- the named decorator
-