KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > cocoon > portal > pluto > services > PropertyManagerServiceImpl


1 /*
2  * Copyright 2004,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 package org.apache.cocoon.portal.pluto.services;
17
18 import java.util.Collections JavaDoc;
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.property.PropertyManagerService;
26
27 /**
28  * Dummy property manager service. Since vendor specific information from
29  * the portlets is not needed they are discarded.
30  *
31  * @see javax.portlet.PortletResponse#addProperty(String, String)
32  * @see javax.portlet.PortletResponse#setProperty(String, String)
33  *
34  * @author <a HREF="mailto:durdina@asset.sk">Michal Durdina</a>
35  *
36  * @version CVS $Id: PropertyManagerServiceImpl.java 30932 2004-07-29 17:35:38Z vgritsenko $
37  */

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

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

82     public Map JavaDoc getRequestProperties(PortletWindow window, HttpServletRequest JavaDoc request) {
83
84         return Collections.EMPTY_MAP;
85     }
86
87 }
88
Popular Tags