com.sitemesh
Interface DecoratorMapper

All Known Implementing Classes:
DefaultDecoratorMapper

public interface DecoratorMapper

The DecoratorMapper is resposible for determining which Decorator should be used for a Page . Implementations of this are returned by Factory . All implementations of this should be thread safe.

Version:
$Revision: 1.8 $
Author:
Joe Walnes

Method Summary
 Decorator getDecorator(javax.servlet.http.HttpServletRequest request, Page page)
          Return appropriate Decorator for a certain Page.
 void init(javax.servlet.Config config, java.util.Properties properties)
          Initialize the mapper.
 

Method Detail

init

public void init(javax.servlet.Config config,
                 java.util.Properties properties)
          throws java.lang.InstantiationException
Initialize the mapper. This is always called before the other method.
Parameters:
config - Config supplied by Servlet or Filter.
properties - Any initialization properties (specific to implementation).
Throws:
java.lang.InstantionException - should be thrown if the implementation cannot be initialized properly.

getDecorator

public Decorator getDecorator(javax.servlet.http.HttpServletRequest request,
                              Page page)
Return appropriate Decorator for a certain Page. The implementation can determine the result based on the actual request or the data of the parsed page.