01: // Copyright 2006, 2007 The Apache Software Foundation
02: //
03: // Licensed under the Apache License, Version 2.0 (the "License");
04: // you may not use this file except in compliance with the License.
05: // 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
10: // distributed under the License is distributed on an "AS IS" BASIS,
11: // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12: // See the License for the specific language governing permissions and
13: // limitations under the License.
14:
15: package org.apache.tapestry.internal.services;
16:
17: import org.apache.tapestry.internal.structure.Page;
18:
19: /**
20: * Per-thread service that caches page instances for the duration of the request, and is also
21: * responsible for tracking the active page (the page which will ultimately render the response).
22: */
23: public interface RequestPageCache {
24: /**
25: * Gets the page via its page name, in the current locale. The page name is resolved to a class
26: * name, which is used to obtain the page (from the page pool).
27: *
28: * @param logicalPageName
29: * the name of the page to retrieve (this is the logical page name, not the fully
30: * qualified class name)
31: * @return a page instance reserved for this request
32: * @throws IllegalArgumentException
33: * if the name can not be resolved to a page instance
34: */
35: Page get(String logicalPageName);
36: }
|