|
|||||||||||||||||||
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 javax.servlet.ServletConfig;
|
|
18 |
import javax.servlet.ServletContext;
|
|
19 |
import javax.servlet.http.HttpServlet;
|
|
20 |
|
|
21 |
import org.apache.tapestry.services.ApplicationGlobals;
|
|
22 |
import org.apache.tapestry.spec.IApplicationSpecification;
|
|
23 |
|
|
24 |
/**
|
|
25 |
* Implementation of {@link ApplicationGlobals}.
|
|
26 |
*
|
|
27 |
* @author Howard Lewis Ship
|
|
28 |
* @since 3.1
|
|
29 |
*/
|
|
30 |
public class ApplicationGlobalsImpl implements ApplicationGlobals |
|
31 |
{ |
|
32 |
private HttpServlet _servlet;
|
|
33 |
private ServletContext _context;
|
|
34 |
private IApplicationSpecification _specification;
|
|
35 |
|
|
36 | 53 |
public void store(HttpServlet servlet, IApplicationSpecification applicationSpecification) |
37 |
{ |
|
38 | 53 |
_servlet = servlet; |
39 | 53 |
_context = servlet.getServletContext(); |
40 | 53 |
_specification = applicationSpecification; |
41 |
} |
|
42 |
|
|
43 | 52 |
public HttpServlet getServlet()
|
44 |
{ |
|
45 | 52 |
return _servlet;
|
46 |
} |
|
47 |
|
|
48 | 157 |
public IApplicationSpecification getSpecification()
|
49 |
{ |
|
50 | 157 |
return _specification;
|
51 |
} |
|
52 |
|
|
53 | 116 |
public ServletContext getContext()
|
54 |
{ |
|
55 | 116 |
return _context;
|
56 |
} |
|
57 |
|
|
58 | 52 |
public String getServletName()
|
59 |
{ |
|
60 | 52 |
return _servlet.getServletName();
|
61 |
} |
|
62 |
|
|
63 | 52 |
public ServletConfig getServletConfig()
|
64 |
{ |
|
65 | 52 |
return _servlet.getServletConfig();
|
66 |
} |
|
67 |
|
|
68 |
} |
|
69 |
|
|