From 040fae0ed2f90e16a22d570f2a342584c39d5cc4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Petter=20Holmstr=C3=B6m?= Date: Wed, 28 Oct 2009 09:59:09 +0000 Subject: [PATCH] Made PortletApplicationContext conform to new Portlet 2 API. svn changeset:9420/svn branch:portlet_2.0 --- .../gwt/server/PortletApplicationContext.java | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/src/com/vaadin/terminal/gwt/server/PortletApplicationContext.java b/src/com/vaadin/terminal/gwt/server/PortletApplicationContext.java index dfbfaf38ee..6aabc34906 100644 --- a/src/com/vaadin/terminal/gwt/server/PortletApplicationContext.java +++ b/src/com/vaadin/terminal/gwt/server/PortletApplicationContext.java @@ -7,6 +7,7 @@ import java.io.IOException; import java.io.OutputStream; import java.io.PrintWriter; import java.io.Serializable; +import java.util.Collection; import java.util.HashMap; import java.util.Iterator; import java.util.LinkedHashSet; @@ -16,13 +17,20 @@ import java.util.Set; import javax.portlet.ActionRequest; import javax.portlet.ActionResponse; +import javax.portlet.CacheControl; import javax.portlet.Portlet; +import javax.portlet.PortletMode; import javax.portlet.PortletSession; import javax.portlet.PortletURL; import javax.portlet.RenderRequest; import javax.portlet.RenderResponse; +import javax.portlet.ResourceURL; +import javax.servlet.http.Cookie; import javax.servlet.http.HttpSession; +import org.w3c.dom.DOMException; +import org.w3c.dom.Element; + import com.vaadin.Application; /** @@ -269,6 +277,35 @@ public class PortletApplicationContext extends WebApplicationContext implements response.setTitle(title); } + public void setNextPossiblePortletModes( + Collection portletModes) { + // NOP + // TODO throw? + } + + public ResourceURL createResourceURL() { + return response.createResourceURL(); + } + + public CacheControl getCacheControl() { + return response.getCacheControl(); + } + + public void addProperty(Cookie cookie) { + // NOP + // TODO throw? + } + + public void addProperty(String key, Element element) { + // NOP + // TODO throw? + } + + public Element createElement(String tagName) throws DOMException { + // NOP + return null; + } + } } -- 2.39.5