|
|||||||||||||||||||
30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover | |||||||||||||||||||
Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
ApplicationGlobalsImpl.java | - | 100% | 100% | 100% |
|
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.services.impl;
|
|
16 |
|
|
17 |
import java.util.List;
|
|
18 |
|
|
19 |
import org.apache.tapestry.services.ApplicationGlobals;
|
|
20 |
import org.apache.tapestry.spec.IApplicationSpecification;
|
|
21 |
import org.apache.tapestry.web.WebActivator;
|
|
22 |
import org.apache.tapestry.web.WebContext;
|
|
23 |
|
|
24 |
/**
|
|
25 |
* Implementation of {@link ApplicationGlobals}.
|
|
26 |
*
|
|
27 |
* @author Howard Lewis Ship
|
|
28 |
* @since 4.0
|
|
29 |
*/
|
|
30 |
public class ApplicationGlobalsImpl implements ApplicationGlobals |
|
31 |
{ |
|
32 |
private WebActivator _activator;
|
|
33 |
|
|
34 |
private IApplicationSpecification _specification;
|
|
35 |
|
|
36 |
private WebContext _webContext;
|
|
37 |
|
|
38 |
private List _factoryServices;
|
|
39 |
|
|
40 | 50 |
public void storeActivator(WebActivator activator) |
41 |
{ |
|
42 | 50 |
_activator = activator; |
43 |
} |
|
44 |
|
|
45 | 50 |
public void storeSpecification(IApplicationSpecification applicationSpecification) |
46 |
{ |
|
47 | 50 |
_specification = applicationSpecification; |
48 |
} |
|
49 |
|
|
50 | 61 |
public WebActivator getActivator()
|
51 |
{ |
|
52 | 61 |
return _activator;
|
53 |
} |
|
54 |
|
|
55 | 48 |
public IApplicationSpecification getSpecification()
|
56 |
{ |
|
57 | 48 |
return _specification;
|
58 |
} |
|
59 |
|
|
60 | 45 |
public String getActivatorName()
|
61 |
{ |
|
62 | 45 |
return _activator.getActivatorName();
|
63 |
} |
|
64 |
|
|
65 | 2108 |
public WebContext getWebContext()
|
66 |
{ |
|
67 | 2108 |
return _webContext;
|
68 |
} |
|
69 |
|
|
70 | 45 |
public void storeContext(WebContext context) |
71 |
{ |
|
72 | 45 |
_webContext = context; |
73 |
} |
|
74 |
|
|
75 | 45 |
public void storeFactoryServices(List factoryServices) |
76 |
{ |
|
77 | 45 |
_factoryServices = factoryServices; |
78 |
} |
|
79 |
|
|
80 | 45 |
public List getFactoryServices()
|
81 |
{ |
|
82 | 45 |
return _factoryServices;
|
83 |
} |
|
84 |
} |
|