1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.pluto.services.property;
18
19 import java.util.Map;
20
21 import javax.servlet.http.HttpServletRequest;
22 import javax.servlet.http.HttpServletResponse;
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 request,
58 HttpServletResponse response,
59 Map 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 getRequestProperties(PortletWindow window,
82 HttpServletRequest request);
83
84 }