Class AbstractDecoratorMapper
- java.lang.Object
-
- com.opensymphony.module.sitemesh.mapper.AbstractDecoratorMapper
-
- All Implemented Interfaces:
DecoratorMapper
- Direct Known Subclasses:
AgentDecoratorMapper
,ConfigDecoratorMapper
,CookieDecoratorMapper
,FileDecoratorMapper
,FrameSetDecoratorMapper
,InlineDecoratorMapper
,LanguageDecoratorMapper
,OSDecoratorMapper
,PageDecoratorMapper
,ParameterDecoratorMapper
,PrintableDecoratorMapper
,RobotDecoratorMapper
public abstract class AbstractDecoratorMapper extends java.lang.Object implements DecoratorMapper
Abstract DecoratorMapper implementation for easy creation of new DecoratorMappers.Typically, an implementation would override getNamedDecorator() or getDecorator(). If a Decorator cannot be returned from either of these, then they should delegate to their superclass.
- Version:
- $Revision: 1.1 $
- Author:
- Joe Walnes
- See Also:
DecoratorMapper
-
-
Field Summary
Fields Modifier and Type Field Description protected Config
config
protected DecoratorMapper
parent
Parent DecoratorMapper.
-
Constructor Summary
Constructors Constructor Description AbstractDecoratorMapper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Decorator
getDecorator(javax.servlet.http.HttpServletRequest request, Page page)
Delegate to parent.Decorator
getNamedDecorator(javax.servlet.http.HttpServletRequest request, java.lang.String name)
Delegate to parent.void
init(Config config, java.util.Properties properties, DecoratorMapper parent)
Set parent.
-
-
-
Field Detail
-
parent
protected DecoratorMapper parent
Parent DecoratorMapper.
-
config
protected Config config
-
-
Method Detail
-
init
public void init(Config config, java.util.Properties properties, DecoratorMapper parent) throws java.lang.InstantiationException
Set parent.- Specified by:
init
in interfaceDecoratorMapper
- Parameters:
config
- Config supplied by Servlet or Filter.properties
- Any initialization properties (specific to implementation).- Throws:
java.lang.InstantiationException
- should be thrown if the implementation cannot be initialized properly.
-
getDecorator
public Decorator getDecorator(javax.servlet.http.HttpServletRequest request, Page page)
Delegate to parent.- Specified by:
getDecorator
in interfaceDecoratorMapper
-
getNamedDecorator
public Decorator getNamedDecorator(javax.servlet.http.HttpServletRequest request, java.lang.String name)
Delegate to parent.- Specified by:
getNamedDecorator
in interfaceDecoratorMapper
-
-