01: package com.opensymphony.module.sitemesh;
02:
03: /**
04: * @author Joe Walnes
05: */
06: public interface PageParserSelector {
07:
08: /**
09: * Determine whether a Page of given content-type should be parsed or not.
10: */
11: boolean shouldParsePage(String contentType);
12:
13: /**
14: * Create a PageParser suitable for the given content-type.
15: *
16: * <p>For example, if the supplied parameter is <code>text/html</code>
17: * a parser shall be returned that can parse HTML accordingly.</p> Never returns null.
18: *
19: * @param contentType The MIME content-type of the data to be parsed
20: * @return Appropriate <code>PageParser</code> for reading data
21: *
22: */
23: PageParser getPageParser(String contentType);
24:
25: }
|