KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > tapestry > services > ApplicationGlobals


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;
16
17 import java.util.List JavaDoc;
18
19 import org.apache.tapestry.spec.IApplicationSpecification;
20 import org.apache.tapestry.web.WebActivator;
21 import org.apache.tapestry.web.WebContext;
22
23 /**
24  * A "global" holder for various services and configurations. In many cases, these values end up as
25  * properties of the {@link org.apache.tapestry.services.Infrastructure}. The servlet and portlet
26  * implementations differentiate themselves by storing different values into these properties.
27  *
28  * @author Howard Lewis Ship
29  * @since 4.0
30  */

31 public interface ApplicationGlobals
32 {
33     /**
34      * Invoked by the (indirectly) by the servlet at init(), after parsing the application
35      * specification.
36      */

37     public void storeActivator(WebActivator activator);
38
39     public void storeSpecification(IApplicationSpecification applicationSpecification);
40
41     /**
42      * Invoked by the (indirectly) by the servlet at init().
43      */

44
45     public void storeContext(WebContext context);
46
47     /**
48      * Returns the previously stored context.
49      *
50      * @see #store(WebContext)}.
51      */

52
53     public WebContext getWebContext();
54
55     public WebActivator getActivator();
56
57     public IApplicationSpecification getSpecification();
58
59     public String JavaDoc getActivatorName();
60
61     /**
62      * Stores the default set of engine service definitions. Application services override factory
63      * services with the same {@link org.apache.tapestry.engine.IEngineService#getName()name}.
64      *
65      * @param factoryServices
66      * List of {@link org.apache.tapestry.engine.IEngineService}.
67      */

68
69     public void storeFactoryServices(List JavaDoc factoryServices);
70
71     /**
72      * Returns the factory default services as a List of
73      * {@link org.apache.tapestry.engine.IEngineService}.
74      */

75
76     public List JavaDoc getFactoryServices();
77 }
Popular Tags