1/*2 * Licensed to the Apache Software Foundation (ASF) under one or more3 * contributor license agreements. See the NOTICE file distributed with4 * this work for additional information regarding copyright ownership.5 * The ASF licenses this file to You under the Apache License, Version 2.06 * (the "License"); you may not use this file except in compliance with7 * the License. You may obtain a copy of the License at8 * 9 * http://www.apache.org/licenses/LICENSE-2.010 * 11 * Unless required by applicable law or agreed to in writing, software12 * 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 and15 * limitations under the License.16 */17packageorg.apache.jetspeed.aggregator.impl;
1819import javax.servlet.http.HttpServletResponse;
2021import org.apache.jetspeed.aggregator.ContentDispatcherCtrl;
22import org.apache.jetspeed.aggregator.PortletContent;
23import org.apache.jetspeed.om.page.Fragment;
24import org.apache.jetspeed.request.RequestContext;
25import org.apache.pluto.om.window.PortletWindow;
2627/***28 * <p>29 * The ContentDispatcher allows customer classes to retrieved rendered content30 * for a specific fragment31 * </p>32 * 33 * @author <a href="mailto:raphael@apache.org">Rapha?l Luta </a>34 * @version $Id: ContentDispatcherImpl.java 516448 2007-03-09 16:25:47Z ate $35 */36publicclassContentDispatcherImpl implements ContentDispatcherCtrl
37 {
38private PortletContent content = null;
3940privateContentDispatcherImpl()
41 {}
4243publicContentDispatcherImpl(PortletContent content)
44 {
45this.content = content;
46 }
4748public HttpServletResponse getResponseForWindow( PortletWindow window, RequestContext request )
49 {
50returnnewHttpBufferedResponse(request.getResponse(), this.content.getWriter());
51 }
5253public HttpServletResponse getResponseForFragment( Fragment fragment, RequestContext request )
54 {
55returnnewHttpBufferedResponse(request.getResponse(), this.content.getWriter());
56 }
5758/***59 * <p>60 * getPortletContent61 * </p>62 *63 * @see org.apache.jetspeed.aggregator.ContentDispatcher#getPortletContent(org.apache.jetspeed.om.page.Fragment)64 * @param fragment65 * @return66 */67public PortletContent getPortletContent( Fragment fragment )
68 {
69returnthis.content;
70 }
71 }