01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17: package org.apache.pluto.spi;
18:
19: import javax.servlet.http.HttpServletRequest;
20:
21: import org.apache.pluto.PortletWindow;
22:
23: import java.util.Map;
24:
25: /**
26: * The callback service interface defining callback methods that will be invoked
27: * by the portlet container when necessary.
28: * @version 1.0
29: * @since Sep 21, 2004
30: */
31: public interface PortalCallbackService extends ContainerService {
32:
33: /**
34: * Set the title to be used for this portlet.
35: * @param request the servlet request.
36: * @param portletWindow the portlet window.
37: * @param title the title to set.
38: */
39: public void setTitle(HttpServletRequest request,
40: PortletWindow portletWindow, String title);
41:
42: /**
43: * Returns a URL provider used to constuct a URL to the given portlet.
44: * @param request the servlet request.
45: * @param portletWindow the portlet window.
46: * @return the URL provider used to construct a URL to the given portlet.
47: */
48: public PortletURLProvider getPortletURLProvider(
49: HttpServletRequest request, PortletWindow portletWindow);
50:
51: /**
52: * Returns a URL provider used to construct a URL to a resource in the web
53: * application.
54: * @param request the servlet request.
55: * @param portletWindow the portlet window.
56: * @return the URL provider used to construct a URL to a resource.
57: */
58: public ResourceURLProvider getResourceURLProvider(
59: HttpServletRequest request, PortletWindow portletWindow);
60:
61: public Map getRequestProperties(HttpServletRequest request,
62: PortletWindow portletWindow);
63:
64: public void setResponseProperty(HttpServletRequest request,
65: PortletWindow portletWindow, String property, String value);
66:
67: public void addResponseProperty(HttpServletRequest request,
68: PortletWindow portletWindow, String property, String value);
69:
70: }
|