KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > springframework > web > portlet > context > ConfigurablePortletApplicationContext


1 /*
2  * Copyright 2002-2007 the original author or authors.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16
17 package org.springframework.web.portlet.context;
18
19 import javax.portlet.PortletConfig;
20 import javax.portlet.PortletContext;
21
22 import org.springframework.context.ConfigurableApplicationContext;
23 import org.springframework.web.context.WebApplicationContext;
24
25 /**
26  * Interface to be implemented by configurable portlet application contexts.
27  * Supported by {@link org.springframework.web.portlet.FrameworkPortlet}.
28  *
29  * <p>Note: The setters of this interface need to be called before an
30  * invocation of the {@link #refresh} method inherited from
31  * {@link org.springframework.context.ConfigurableApplicationContext}.
32  * They do not cause an initialization of the context on their own.
33  *
34  * @author Juergen Hoeller
35  * @author William G. Thompson, Jr.
36  * @author John A. Lewis
37  * @since 2.0
38  * @see #refresh
39  * @see org.springframework.web.context.ContextLoader#createWebApplicationContext
40  * @see org.springframework.web.portlet.FrameworkPortlet#createPortletApplicationContext
41  * @see org.springframework.web.context.ConfigurableWebApplicationContext
42  */

43 public interface ConfigurablePortletApplicationContext
44         extends WebApplicationContext, ConfigurableApplicationContext {
45
46     /**
47      * Any number of these characters are considered delimiters between
48      * multiple context paths in a single String value.
49      * @see org.springframework.web.portlet.FrameworkPortlet#setContextConfigLocation
50      */

51     String JavaDoc CONFIG_LOCATION_DELIMITERS = ",; \t\n";
52
53
54     /**
55      * Set the PortletContext for this portlet application context.
56      * <p>Does not cause an initialization of the context: refresh needs to be
57      * called after the setting of all configuration properties.
58      * @see #refresh()
59      */

60     void setPortletContext(PortletContext portletContext);
61
62     /**
63      * Return the standard Portlet API PortletContext for this application.
64      */

65     PortletContext getPortletContext();
66
67     /**
68      * Set the PortletConfig for this portlet application context.
69      * @see #refresh()
70      */

71     void setPortletConfig(PortletConfig portletConfig);
72
73     /**
74      * Return the PortletConfig for this portlet application context, if any.
75      */

76     PortletConfig getPortletConfig();
77
78     /**
79      * Set the namespace for this portlet application context,
80      * to be used for building a default context config location.
81      */

82     void setNamespace(String JavaDoc namespace);
83
84     /**
85      * Return the namespace for this web application context, if any.
86      */

87     String JavaDoc getNamespace();
88
89     /**
90      * Set the config locations for this portlet application context.
91      * If not set, the implementation is supposed to use a default for the
92      * given namespace.
93      */

94     void setConfigLocations(String JavaDoc[] configLocations);
95
96     /**
97      * Return the config locations for this web application context,
98      * or <code>null</code> if none specified.
99      */

100     String JavaDoc[] getConfigLocations();
101
102 }
103
Popular Tags