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.driver.services.container;
18:
19: import java.util.Collections;
20: import java.util.Map;
21:
22: import javax.servlet.http.HttpServletRequest;
23:
24: import org.apache.pluto.PortletWindow;
25: import org.apache.pluto.driver.AttributeKeys;
26: import org.apache.pluto.spi.PortalCallbackService;
27: import org.apache.pluto.spi.PortletURLProvider;
28: import org.apache.pluto.spi.ResourceURLProvider;
29:
30: /**
31: * @version 1.0
32: * @since Sep 22, 2004
33: */
34: public class PortalCallbackServiceImpl implements PortalCallbackService {
35:
36: // Constructor -------------------------------------------------------------
37:
38: /**
39: * Default no-arg constructor.
40: */
41: public PortalCallbackServiceImpl() {
42: // Do nothing.
43: }
44:
45: // PortalCallbackService Impl ----------------------------------------------
46:
47: /**
48: * Method invoked by the container when the portlet sets its title. This
49: * method binds the dynamic portlet title to the servlet request for later
50: * use.
51: */
52: public void setTitle(HttpServletRequest request,
53: PortletWindow portletWindow, String title) {
54: request.setAttribute(AttributeKeys.PORTLET_TITLE, title);
55: }
56:
57: public PortletURLProvider getPortletURLProvider(
58: HttpServletRequest request, PortletWindow portletWindow) {
59: return new PortletURLProviderImpl(request, portletWindow);
60: }
61:
62: public ResourceURLProvider getResourceURLProvider(
63: HttpServletRequest request, PortletWindow portletWindow) {
64: return new ResourceURLProviderImpl(request, portletWindow);
65: }
66:
67: public Map getRequestProperties(HttpServletRequest request,
68: PortletWindow portletWindow) {
69: // TODO: currently this method returns an empty map.
70: return Collections.EMPTY_MAP;
71: }
72:
73: public void setResponseProperty(HttpServletRequest request,
74: PortletWindow portletWindow, String property, String value) {
75: // TODO: currently this method does nothing.
76: }
77:
78: public void addResponseProperty(HttpServletRequest request,
79: PortletWindow portletWindow, String property, String value) {
80: // TODO: currently this method does nothing.
81: }
82: }
|