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 org.apache.pluto.services.ContainerService;
20 import java.util.*;
21
22 import javax.servlet.http.HttpServletRequest;
23 import javax.servlet.http.HttpServletResponse;
24 import org.apache.pluto.om.window.PortletWindow;
25
26 /***
27 * The <code>PropertyManagerService</code> interface is a container service
28 * providing the portlet container with external defined properties.
29 * This interface allows to associate properties with the portlet request
30 * and portlet response.
31 * <br>
32 * This service represents an abstract layer to make the property
33 * management independent of the portlet container and to allow
34 * diverse special implementations.
35 *
36 * <p>This SPI interface can be implemented by the portal.</p>
37 **/
38 public interface PropertyManagerService extends ContainerService
39 {
40
41 /***
42 * Sets the given property map defined by the portlet window in its response.
43 * <br>
44 * The purpose of this method is to provide the portal framework
45 * with a new map of properties set by the portlet. The map can be empty, but not NULL
46 * <br>
47 * This method can be called multiple times during one request by the portlet container
48 *
49 * @param window the portlet window of this property
50 * @param request the servlet request
51 * @param response the servlet response
52 * @param properties the String/String array map containing the
53 * properties to be set.
54 **/
55 public void setResponseProperties(PortletWindow window,
56 HttpServletRequest request,
57 HttpServletResponse response,
58 Map properties);
59
60 /***
61 * Returns all properties for the given portlet window
62 * defined in the portal as String/String array map.
63 * They will be made available to the portlet through the
64 * portlet request.
65 * <br>
66 * The purpose of this method is to allow the portal framework
67 * to create a map of properties and make it available to the portlet container.
68 * <br>
69 * This method can be called multiple times during one request by the portlet container
70 * <br>
71 * The return value cannot be null.
72 *
73 * @param window the portlet window of this property
74 * @param request the servlet request
75 *
76 * @return a <code>Map</code> containing
77 * all properties. If there are no properties of
78 * that name returns an empty <code>Map</code>.
79 **/
80 public Map getRequestProperties(PortletWindow window,
81 HttpServletRequest request);
82
83 }