1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.portletbridge.portlet;
17
18 import java.io.Reader;
19 import java.net.URI;
20
21 import javax.portlet.RenderRequest;
22 import javax.portlet.RenderResponse;
23
24 import org.portletbridge.ResourceException;
25
26 /***
27 * The portlet uses implementations of this class to transform data
28 * from the downstream site into the portlet content
29 *
30 * @author JMcCrindle
31 */
32 public interface BridgeTransformer {
33
34 /***
35 * Transform the downstream content to portlet content
36 *
37 * @param memento the portlet memento to use
38 * @param perPortletMemento the memento for the particular portlet instance
39 * @param currentUrl the current url
40 * @param request the render request
41 * @param response the render response to write the result out to
42 * @param in the reader to read the downstream content from
43 * @throws ResourceException if there is a problem transforming the content
44 */
45 void transform(PortletBridgeMemento memento, PerPortletMemento perPortletMemento, URI currentUrl,
46 RenderRequest request, RenderResponse response,
47 Reader in) throws ResourceException;
48 }