01: /*
02: * Copyright 2005-2006 the original author or authors.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
05: * in compliance with the License. You may obtain a copy of the License at
06: *
07: * http://www.apache.org/licenses/LICENSE-2.0
08: *
09: * Unless required by applicable law or agreed to in writing, software distributed under the License
10: * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11: * or implied. See the License for the specific language governing permissions and limitations under
12: * the License.
13: */
14:
15: package org.strecks.page;
16:
17: import javax.servlet.http.HttpServletResponse;
18:
19: /**
20: * Interface representing a page class that sits behind a JSP at the view layer. Note that because this is part of the
21: * "View" it is perfectly acceptable to generate marked up page content from implementations of this interface where
22: * necessary. Provides a mechanism for Java-based view content generation, which can be useful at times, especially for
23: * outputting text which would otherwise require verbose JSP logic tags in the markup. <br>
24: * <br>
25: * Note that a <code>PageClass</code> maintains a reference to the JSP's location within the web application folder
26: * structure, which can be accessed using <code>getPagePath()</code>
27: *
28: * @author Phil Zoio
29: */
30: public interface Page {
31:
32: /**
33: * Implementations must return a JSP path, which is the default view for this page class. Path should be relative to
34: * base path of JSP classes
35: */
36: String getPagePath();
37:
38: /**
39: * Sets the HttpServletResponse, useful for rewriting any generated URLs
40: */
41: void setHttpServletResponse(HttpServletResponse response);
42:
43: }
|