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 | 0 | 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 | |
public void storeActivator(WebActivator activator) |
45 | |
{ |
46 | 0 | _activator = activator; |
47 | 0 | } |
48 | |
|
49 | |
public void storeSpecification(IApplicationSpecification applicationSpecification) |
50 | |
{ |
51 | 0 | _specification = applicationSpecification; |
52 | 0 | } |
53 | |
|
54 | |
public WebActivator getActivator() |
55 | |
{ |
56 | 0 | return _activator; |
57 | |
} |
58 | |
|
59 | |
public IApplicationSpecification getSpecification() |
60 | |
{ |
61 | 0 | return _specification; |
62 | |
} |
63 | |
|
64 | |
public String getActivatorName() |
65 | |
{ |
66 | 0 | return _activator.getActivatorName(); |
67 | |
} |
68 | |
|
69 | |
public WebContext getWebContext() |
70 | |
{ |
71 | 0 | return _webContext; |
72 | |
} |
73 | |
|
74 | |
public void storeWebContext(WebContext context) |
75 | |
{ |
76 | 0 | _webContext = context; |
77 | 0 | } |
78 | |
|
79 | |
public void storeFactoryServices(List factoryServices) |
80 | |
{ |
81 | 0 | _factoryServices = factoryServices; |
82 | 0 | } |
83 | |
|
84 | |
public List getFactoryServices() |
85 | |
{ |
86 | 0 | return _factoryServices; |
87 | |
} |
88 | |
|
89 | |
public ServletContext getServletContext() |
90 | |
{ |
91 | 0 | return _servletContext; |
92 | |
} |
93 | |
|
94 | |
public void storeServletContext(ServletContext context) |
95 | |
{ |
96 | 0 | _servletContext = context; |
97 | 0 | } |
98 | |
} |