Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
IEngine |
|
| 1.0;1 |
1 | // Copyright 2004, 2005 The Apache Software Foundation | |
2 | // | |
3 | // Licensed under the Apache License, Version 2.0 (the "License"); | |
4 | // you may not use this file except in compliance with the License. | |
5 | // You may obtain a copy of the License at | |
6 | // | |
7 | // http://www.apache.org/licenses/LICENSE-2.0 | |
8 | // | |
9 | // 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; | |
16 | ||
17 | import java.util.Locale; | |
18 | ||
19 | import org.apache.tapestry.services.Infrastructure; | |
20 | import org.apache.tapestry.services.WebRequestServicer; | |
21 | ||
22 | /** | |
23 | * Defines the core, session-persistant object used to run a Tapestry application for a single | |
24 | * client (each client will have its own instance of the engine). | |
25 | * <p> | |
26 | * The engine exists to provide core services to the pages and components that make up the | |
27 | * application. The engine is a delegate to the {@link ApplicationServlet}. | |
28 | * <p> | |
29 | * Starting in release 4.0, the engine is kept around only for compatibility (with release 3.0). | |
30 | * It's functions have been moved over into a collection of HiveMind services (or are in the process | |
31 | * of doing so). | |
32 | * | |
33 | * @author Howard Lewis Ship | |
34 | */ | |
35 | ||
36 | public interface IEngine extends WebRequestServicer | |
37 | { | |
38 | /** | |
39 | * Returns the locale for the engine. This locale is used when selecting templates and assets. | |
40 | */ | |
41 | ||
42 | Locale getLocale(); | |
43 | ||
44 | /** | |
45 | * Changes the engine's locale. Any subsequently loaded pages will be in the new locale (though | |
46 | * pages already loaded stay in the old locale). Generally, you should render a new page after | |
47 | * changing the locale, to show that the locale has changed. | |
48 | */ | |
49 | ||
50 | void setLocale(Locale value); | |
51 | ||
52 | /** | |
53 | * Returns the encoding to be used to generate the responses and accept the requests. | |
54 | * | |
55 | * @since 3.0 | |
56 | */ | |
57 | ||
58 | String getOutputEncoding(); | |
59 | ||
60 | /** | |
61 | * Returns the {@link org.apache.tapestry.services.Infrastructure} object, a central | |
62 | * registry of key HiveMind services used by Tapestry. | |
63 | * | |
64 | * @since 4.0 | |
65 | */ | |
66 | ||
67 | Infrastructure getInfrastructure(); | |
68 | } |