KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > pluto > services > property > PropertyManagerService


1 /*
2  * Copyright 2003,2004 The Apache Software Foundation.
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.apache.pluto.services.property;
18
19 import java.util.Map JavaDoc;
20
21 import javax.servlet.http.HttpServletRequest JavaDoc;
22 import javax.servlet.http.HttpServletResponse JavaDoc;
23
24 import org.apache.pluto.om.window.PortletWindow;
25 import org.apache.pluto.services.ContainerService;
26
27 /**
28  * The <code>PropertyManagerService</code> interface is a container service
29  * providing the portlet container with external defined properties.
30  * This interface allows to associate properties with the portlet request
31  * and portlet response.
32  * <br>
33  * This service represents an abstract layer to make the property
34  * management independent of the portlet container and to allow
35  * diverse special implementations.
36  *
37  * <p>This SPI interface can be implemented by the portal.</p>
38  **/

39 public interface PropertyManagerService extends ContainerService
40 {
41
42     /**
43      * Sets the given property map defined by the portlet window in its response.
44      * <br>
45      * The purpose of this method is to provide the portal framework
46      * with a new map of properties set by the portlet. The map can be empty, but not NULL
47      * <br>
48      * This method can be called multiple times during one request by the portlet container
49      *
50      * @param window the portlet window of this property
51      * @param request the servlet request
52      * @param response the servlet response
53      * @param properties the String/String array map containing the
54      * properties to be set.
55      **/

56     public void setResponseProperties(PortletWindow window,
57                                       HttpServletRequest JavaDoc request,
58                                       HttpServletResponse JavaDoc response,
59                                       Map JavaDoc properties);
60
61     /**
62      * Returns all properties for the given portlet window
63      * defined in the portal as String/String array map.
64      * They will be made available to the portlet through the
65      * portlet request.
66      * <br>
67      * The purpose of this method is to allow the portal framework
68      * to create a map of properties and make it available to the portlet container.
69      * <br>
70      * This method can be called multiple times during one request by the portlet container
71      * <br>
72      * The return value cannot be null.
73      *
74      * @param window the portlet window of this property
75      * @param request the servlet request
76      *
77      * @return a <code>Map</code> containing
78      * all properties. If there are no properties of
79      * that name returns an empty <code>Map</code>.
80      **/

81     public Map JavaDoc getRequestProperties(PortletWindow window,
82                                     HttpServletRequest JavaDoc request);
83
84 }
85
Popular Tags