Classes in this File | Line Coverage | Branch Coverage | Complexity | |||||||
AbstractSetupApplicationGlobals |
|
| 1.0;1 |
1 | // Copyright 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.services.impl; |
|
16 | ||
17 | import java.util.List; |
|
18 | ||
19 | import org.apache.tapestry.services.ApplicationGlobals; |
|
20 | import org.apache.tapestry.services.Infrastructure; |
|
21 | ||
22 | /** |
|
23 | * Base class for settting up services and configurations inside |
|
24 | * {@link org.apache.tapestry.services.ApplicationGlobals tapestry.globals.ApplicationGlobals}. |
|
25 | * |
|
26 | * @author Howard M. Lewis Ship |
|
27 | * @since 4.0 |
|
28 | */ |
|
29 | 0 | public class AbstractSetupApplicationGlobals |
30 | { |
|
31 | ||
32 | private ApplicationGlobals _globals; |
|
33 | ||
34 | private List _factoryServices; |
|
35 | ||
36 | private Infrastructure _infrastructure; |
|
37 | ||
38 | protected void initialize(String mode) |
|
39 | { |
|
40 | 0 | _globals.storeFactoryServices(_factoryServices); |
41 | ||
42 | 0 | _infrastructure.initialize(mode); |
43 | 0 | } |
44 | ||
45 | public void setGlobals(ApplicationGlobals globals) |
|
46 | { |
|
47 | 0 | _globals = globals; |
48 | 0 | } |
49 | ||
50 | public void setFactoryServices(List factoryServices) |
|
51 | { |
|
52 | 0 | _factoryServices = factoryServices; |
53 | 0 | } |
54 | ||
55 | public void setInfrastructure(Infrastructure infrastructure) |
|
56 | { |
|
57 | 0 | _infrastructure = infrastructure; |
58 | 0 | } |
59 | } |