KickJava   Java API By Example, From Geeks To Geeks.

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


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
18  */

19
20 package org.apache.pluto.services.property;
21
22 import java.util.Map JavaDoc;
23
24 import javax.servlet.http.HttpServletRequest JavaDoc;
25 import javax.servlet.http.HttpServletResponse JavaDoc;
26
27 import org.apache.pluto.PortletContainerServices;
28 import org.apache.pluto.om.window.PortletWindow;
29
30
31 /**
32  * The static accessor for the <CODE>PropertyManagerService</CODE>.
33  *
34  * @see PropertyManagerService
35  **/

36 public class PropertyManager
37 {
38
39
40     public static void setResponseProperties(PortletWindow window,
41                                              HttpServletRequest JavaDoc request,
42                                              HttpServletResponse JavaDoc response,
43                                              Map JavaDoc properties)
44     {
45         if (getService() != null)
46         {
47             getService().setResponseProperties( window, request, response, properties);
48         }
49     }
50
51     public static Map JavaDoc getRequestProperties(PortletWindow window,
52                                            HttpServletRequest JavaDoc request)
53     {
54         if (getService() == null)
55         {
56             return null;
57         }
58
59         return getService().getRequestProperties( window, request);
60     }
61
62     private static PropertyManagerService getService()
63     {
64         return(PropertyManagerService)PortletContainerServices.get(PropertyManagerService.class);
65     }
66 }
67
Popular Tags