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').- Version:
- $Revision: 1.2 $
- Author:
- Joe Walnes, Mike Cannon-Brookes
- See Also:
-
Field Summary
FieldsFields 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) RetrieveDecorator
based on 'pattern' tag.getNamedDecorator
(javax.servlet.http.HttpServletRequest request, String name) Retrieve Decorator named in 'name' attribute.void
init
(Config config, Properties properties, DecoratorMapper parent) Create new ConfigLoader using '/WEB-INF/decorators.xml' file.
-
Field Details
-
configLoader
-
-
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:
init
in interfaceDecoratorMapper
- Overrides:
init
in classAbstractDecoratorMapper
- Parameters:
config
- Config supplied by Servlet or Filter.properties
- Any initialization properties (specific to implementation).- Throws:
InstantiationException
- should be thrown if the implementation cannot be initialized properly.
-
getDecorator
RetrieveDecorator
based on 'pattern' tag.- Specified by:
getDecorator
in interfaceDecoratorMapper
- Overrides:
getDecorator
in classAbstractDecoratorMapper
-
getNamedDecorator
Retrieve Decorator named in 'name' attribute. Checks the role if specified.- Specified by:
getNamedDecorator
in interfaceDecoratorMapper
- Overrides:
getNamedDecorator
in classAbstractDecoratorMapper
-