KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > tapestry > services > impl > ApplicationGlobalsImpl


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 JavaDoc;
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 JavaDoc _factoryServices;
39
40     public void storeActivator(WebActivator activator)
41     {
42         _activator = activator;
43     }
44
45     public void storeSpecification(IApplicationSpecification applicationSpecification)
46     {
47         _specification = applicationSpecification;
48     }
49
50     public WebActivator getActivator()
51     {
52         return _activator;
53     }
54
55     public IApplicationSpecification getSpecification()
56     {
57         return _specification;
58     }
59
60     public String JavaDoc getActivatorName()
61     {
62         return _activator.getActivatorName();
63     }
64
65     public WebContext getWebContext()
66     {
67         return _webContext;
68     }
69
70     public void storeContext(WebContext context)
71     {
72         _webContext = context;
73     }
74
75     public void storeFactoryServices(List JavaDoc factoryServices)
76     {
77         _factoryServices = factoryServices;
78     }
79
80     public List JavaDoc getFactoryServices()
81     {
82         return _factoryServices;
83     }
84 }
Popular Tags