1 |
| |
2 |
| |
3 |
| |
4 |
| |
5 |
| |
6 |
| |
7 |
| |
8 |
| |
9 |
| |
10 |
| |
11 |
| |
12 |
| |
13 |
| |
14 |
| |
15 |
| package org.apache.tapestry.services.impl; |
16 |
| |
17 |
| import java.util.List; |
18 |
| |
19 |
| import javax.servlet.ServletContext; |
20 |
| |
21 |
| import org.apache.tapestry.services.ApplicationGlobals; |
22 |
| import org.apache.tapestry.spec.IApplicationSpecification; |
23 |
| import org.apache.tapestry.web.WebActivator; |
24 |
| import org.apache.tapestry.web.WebContext; |
25 |
| |
26 |
| |
27 |
| |
28 |
| |
29 |
| |
30 |
| |
31 |
| |
32 |
| public class ApplicationGlobalsImpl implements ApplicationGlobals |
33 |
| { |
34 |
| private WebActivator _activator; |
35 |
| |
36 |
| private IApplicationSpecification _specification; |
37 |
| |
38 |
| private WebContext _webContext; |
39 |
| |
40 |
| private List _factoryServices; |
41 |
| |
42 |
| private ServletContext _servletContext; |
43 |
| |
44 |
44
| public void storeActivator(WebActivator activator)
|
45 |
| { |
46 |
44
| _activator = activator;
|
47 |
| } |
48 |
| |
49 |
44
| public void storeSpecification(IApplicationSpecification applicationSpecification)
|
50 |
| { |
51 |
44
| _specification = applicationSpecification;
|
52 |
| } |
53 |
| |
54 |
52
| public WebActivator getActivator()
|
55 |
| { |
56 |
52
| return _activator;
|
57 |
| } |
58 |
| |
59 |
42
| public IApplicationSpecification getSpecification()
|
60 |
| { |
61 |
42
| return _specification;
|
62 |
| } |
63 |
| |
64 |
39
| public String getActivatorName()
|
65 |
| { |
66 |
39
| return _activator.getActivatorName();
|
67 |
| } |
68 |
| |
69 |
2779
| public WebContext getWebContext()
|
70 |
| { |
71 |
2779
| return _webContext;
|
72 |
| } |
73 |
| |
74 |
40
| public void storeWebContext(WebContext context)
|
75 |
| { |
76 |
40
| _webContext = context;
|
77 |
| } |
78 |
| |
79 |
39
| public void storeFactoryServices(List factoryServices)
|
80 |
| { |
81 |
39
| _factoryServices = factoryServices;
|
82 |
| } |
83 |
| |
84 |
39
| public List getFactoryServices()
|
85 |
| { |
86 |
39
| return _factoryServices;
|
87 |
| } |
88 |
| |
89 |
1
| public ServletContext getServletContext()
|
90 |
| { |
91 |
1
| return _servletContext;
|
92 |
| } |
93 |
| |
94 |
40
| public void storeServletContext(ServletContext context)
|
95 |
| { |
96 |
40
| _servletContext = context;
|
97 |
| } |
98 |
| } |