diff options
author | Leif Åstrand <leif@vaadin.com> | 2012-09-07 10:46:31 +0300 |
---|---|---|
committer | Leif Åstrand <leif@vaadin.com> | 2012-09-07 10:46:44 +0300 |
commit | 78fcee9817e2216eab619f8f750cf6eda7f545d9 (patch) | |
tree | 73ca2bd9b2279065258be4c0c5f76b48913b3ee5 /server | |
parent | 854fa25e6f9de2dff428a4f5f538a7b47e663402 (diff) | |
download | vaadin-framework-78fcee9817e2216eab619f8f750cf6eda7f545d9.tar.gz vaadin-framework-78fcee9817e2216eab619f8f750cf6eda7f545d9.zip |
Add some deprecation messages about upcoming changes (#9402)
Diffstat (limited to 'server')
9 files changed, 225 insertions, 5 deletions
diff --git a/server/src/com/vaadin/server/AbstractCommunicationManager.java b/server/src/com/vaadin/server/AbstractCommunicationManager.java index 280ee405f0..00d508de4c 100644 --- a/server/src/com/vaadin/server/AbstractCommunicationManager.java +++ b/server/src/com/vaadin/server/AbstractCommunicationManager.java @@ -91,7 +91,10 @@ import com.vaadin.ui.Window; * {@link com.vaadin.client.ApplicationConnection}. * <p> * TODO Document better! + * + * @deprecated might be refactored or removed before 7.0.0 */ +@Deprecated @SuppressWarnings("serial") public abstract class AbstractCommunicationManager implements Serializable { @@ -105,7 +108,10 @@ public abstract class AbstractCommunicationManager implements Serializable { * TODO Document me! * * @author peholmst + * + * @deprecated might be refactored or removed before 7.0.0 */ + @Deprecated public interface Callback extends Serializable { public void criticalNotification(WrappedRequest request, @@ -2381,6 +2387,12 @@ public abstract class AbstractCommunicationManager implements Serializable { return bootstrapHandler; } + /** + * @return + * + * @deprecated might be refactored or removed before 7.0.0 + */ + @Deprecated protected abstract BootstrapHandler createBootstrapHandler(); /** diff --git a/server/src/com/vaadin/server/BootstrapHandler.java b/server/src/com/vaadin/server/BootstrapHandler.java index 1301978fd4..8b4da44f9b 100644 --- a/server/src/com/vaadin/server/BootstrapHandler.java +++ b/server/src/com/vaadin/server/BootstrapHandler.java @@ -42,6 +42,14 @@ import com.vaadin.shared.ApplicationConstants; import com.vaadin.shared.Version; import com.vaadin.ui.UI; +/** + * + * @author Vaadin Ltd + * @since 7.0.0 + * + * @deprecated might be refactored or removed before 7.0.0 + */ +@Deprecated public abstract class BootstrapHandler implements RequestHandler { protected class BootstrapContext implements Serializable { @@ -103,9 +111,8 @@ public abstract class BootstrapHandler implements RequestHandler { } @Override - public boolean handleRequest(VaadinSession session, - WrappedRequest request, WrappedResponse response) - throws IOException { + public boolean handleRequest(VaadinSession session, WrappedRequest request, + WrappedResponse response) throws IOException { try { Class<? extends UI> uiClass = session.getUIClass(request); diff --git a/server/src/com/vaadin/server/CommunicationManager.java b/server/src/com/vaadin/server/CommunicationManager.java index 836afe6748..e4029a847a 100644 --- a/server/src/com/vaadin/server/CommunicationManager.java +++ b/server/src/com/vaadin/server/CommunicationManager.java @@ -33,7 +33,10 @@ import com.vaadin.ui.UI; * * @author Vaadin Ltd. * @since 5.0 + * + * @deprecated might be refactored or removed before 7.0.0 */ +@Deprecated @SuppressWarnings("serial") public class CommunicationManager extends AbstractCommunicationManager { diff --git a/server/src/com/vaadin/server/PortletCommunicationManager.java b/server/src/com/vaadin/server/PortletCommunicationManager.java index 5340d122d9..15f0d4e4f1 100644 --- a/server/src/com/vaadin/server/PortletCommunicationManager.java +++ b/server/src/com/vaadin/server/PortletCommunicationManager.java @@ -36,7 +36,10 @@ import com.vaadin.ui.UI; * * @author peholmst * + * + * @deprecated might be refactored or removed before 7.0.0 */ +@Deprecated @SuppressWarnings("serial") public class PortletCommunicationManager extends AbstractCommunicationManager { diff --git a/server/src/com/vaadin/server/VaadinPortlet.java b/server/src/com/vaadin/server/VaadinPortlet.java index 1e74cda833..45a952d48d 100644 --- a/server/src/com/vaadin/server/VaadinPortlet.java +++ b/server/src/com/vaadin/server/VaadinPortlet.java @@ -72,6 +72,10 @@ import com.vaadin.util.CurrentInstance; */ public class VaadinPortlet extends GenericPortlet implements Constants { + /** + * @deprecated might be refactored or removed before 7.0.0 + */ + @Deprecated public static final String RESOURCE_URL_ID = "APP"; public static class PortletService extends AbstractVaadinService { @@ -302,15 +306,25 @@ public class VaadinPortlet extends GenericPortlet implements Constants { /** * This portlet parameter is used to add styles to the main element. E.g * "height:500px" generates a style="height:500px" to the main element. + * + * @deprecated might be refactored or removed before 7.0.0 */ + @Deprecated public static final String PORTLET_PARAMETER_STYLE = "style"; /** * This portal parameter is used to define the name of the Vaadin theme that * is used for all Vaadin applications in the portal. + * + * @deprecated might be refactored or removed before 7.0.0 */ + @Deprecated public static final String PORTAL_PARAMETER_VAADIN_THEME = "vaadin.theme"; + /** + * @deprecated might be refactored or removed before 7.0.0 + */ + @Deprecated public static final String WRITE_AJAX_PAGE_SCRIPT_WIDGETSET_SHOULD_WRITE = "writeAjaxPageScriptWidgetsetShouldWrite"; // TODO some parts could be shared with AbstractApplicationServlet @@ -365,10 +379,23 @@ public class VaadinPortlet extends GenericPortlet implements Constants { addonContext.destroy(); } + /** + * @author Vaadin Ltd + * + * @deprecated might be refactored or removed before 7.0.0 + */ + @Deprecated protected enum RequestType { FILE_UPLOAD, UIDL, RENDER, STATIC_FILE, APPLICATION_RESOURCE, DUMMY, EVENT, ACTION, UNKNOWN, BROWSER_DETAILS, CONNECTOR_RESOURCE, HEARTBEAT; } + /** + * @param wrappedRequest + * @return + * + * @deprecated might be refactored or removed before 7.0.0 + */ + @Deprecated protected RequestType getRequestType(WrappedPortletRequest wrappedRequest) { PortletRequest request = wrappedRequest.getPortletRequest(); if (request instanceof RenderRequest) { @@ -412,6 +439,15 @@ public class VaadinPortlet extends GenericPortlet implements Constants { && request.getResourceID().equals("DUMMY"); } + /** + * @param request + * @param response + * @throws PortletException + * @throws IOException + * + * @deprecated might be refactored or removed before 7.0.0 + */ + @Deprecated protected void handleRequest(PortletRequest request, PortletResponse response) throws PortletException, IOException { RequestTimer requestTimer = new RequestTimer(); @@ -728,6 +764,14 @@ public class VaadinPortlet extends GenericPortlet implements Constants { handleRequest(request, response); } + /** + * @param request + * @param requestType + * @return + * + * @deprecated might be refactored or removed before 7.0.0 + */ + @Deprecated boolean requestCanCreateApplication(PortletRequest request, RequestType requestType) { if (requestType == RequestType.UIDL && isRepaintAll(request)) { @@ -944,7 +988,10 @@ public class VaadinPortlet extends GenericPortlet implements Constants { * url to load after message, null for current page * @throws IOException * if the writing failed due to input/output error. + * + * @deprecated might be refactored or removed before 7.0.0 */ + @Deprecated void criticalNotification(WrappedPortletRequest request, WrappedPortletResponse response, String caption, String message, String details, String url) throws IOException { diff --git a/server/src/com/vaadin/server/VaadinPortletSession.java b/server/src/com/vaadin/server/VaadinPortletSession.java index 40c88ac8fe..5bd94c623d 100644 --- a/server/src/com/vaadin/server/VaadinPortletSession.java +++ b/server/src/com/vaadin/server/VaadinPortletSession.java @@ -51,7 +51,10 @@ import com.vaadin.util.CurrentInstance; * {@link PortletSession#setAttribute()} is called with the context as value. * * @author peholmst + * + * @deprecated might be refactored or removed before 7.0.0 */ +@Deprecated @SuppressWarnings("serial") public class VaadinPortletSession extends VaadinSession { diff --git a/server/src/com/vaadin/server/VaadinServlet.java b/server/src/com/vaadin/server/VaadinServlet.java index 12e0d05379..a0f6a28ea6 100644 --- a/server/src/com/vaadin/server/VaadinServlet.java +++ b/server/src/com/vaadin/server/VaadinServlet.java @@ -473,7 +473,10 @@ public class VaadinServlet extends HttpServlet implements Constants { * the current page. * @throws IOException * if the writing failed due to input/output error. + * + * @deprecated might be refactored or removed before 7.0.0 */ + @Deprecated protected void criticalNotification(WrappedHttpServletRequest request, HttpServletResponse response, String caption, String message, String details, String url) throws IOException { @@ -660,7 +663,10 @@ public class VaadinServlet extends HttpServlet implements Constants { * @param request * @param requestType * @return true if an application should be created, false otherwise + * + * @deprecated might be refactored or removed before 7.0.0 */ + @Deprecated boolean requestCanCreateApplication(HttpServletRequest request, RequestType requestType) { if (requestType == RequestType.UIDL && isRepaintAll(request)) { @@ -692,7 +698,10 @@ public class VaadinServlet extends HttpServlet implements Constants { * @param path * the resource path. * @return the resource path. + * + * @deprecated might be refactored or removed before 7.0.0 */ + @Deprecated protected static String getResourcePath(ServletContext servletContext, String path) { String resultPath = null; @@ -763,7 +772,10 @@ public class VaadinServlet extends HttpServlet implements Constants { * * @param themeName * @return + * + * @deprecated might be refactored or removed before 7.0.0 */ + @Deprecated protected static String stripSpecialChars(String themeName) { StringBuilder sb = new StringBuilder(); char[] charArray = themeName.toCharArray(); @@ -789,6 +801,15 @@ public class VaadinServlet extends HttpServlet implements Constants { return DEFAULT_THEME_NAME; } + /** + * @param request + * @param response + * @throws IOException + * @throws ServletException + * + * @deprecated might be refactored or removed before 7.0.0 + */ + @Deprecated void handleServiceSessionExpired(WrappedHttpServletRequest request, WrappedHttpServletResponse response) throws IOException, ServletException { @@ -1040,7 +1061,10 @@ public class VaadinServlet extends HttpServlet implements Constants { * @return * * @since 6.6.7 + * + * @deprecated might be refactored or removed before 7.0.0 */ + @Deprecated protected boolean isAllowedVAADINResourceUrl(HttpServletRequest request, URL resourceUrl) { if ("jar".equals(resourceUrl.getProtocol())) { @@ -1124,10 +1148,25 @@ public class VaadinServlet extends HttpServlet implements Constants { return false; } + /** + * + * @author Vaadin Ltd + * @since 7.0.0 + * + * @deprecated might be refactored or removed before 7.0.0 + */ + @Deprecated protected enum RequestType { FILE_UPLOAD, BROWSER_DETAILS, UIDL, OTHER, STATIC_FILE, APPLICATION_RESOURCE, CONNECTOR_RESOURCE, HEARTBEAT; } + /** + * @param request + * @return + * + * @deprecated might be refactored or removed before 7.0.0 + */ + @Deprecated protected RequestType getRequestType(WrappedHttpServletRequest request) { if (ServletPortletHelper.isFileUploadRequest(request)) { return RequestType.FILE_UPLOAD; @@ -1216,7 +1255,10 @@ public class VaadinServlet extends HttpServlet implements Constants { * @throws MalformedURLException * if the application is denied access to the persistent data * store represented by the given URL. + * + * @deprecated might be refactored or removed before 7.0.0 */ + @Deprecated protected URL getApplicationUrl(HttpServletRequest request) throws MalformedURLException { final URL reqURL = new URL( @@ -1264,7 +1306,10 @@ public class VaadinServlet extends HttpServlet implements Constants { * @throws IllegalAccessException * @throws InstantiationException * @throws SessionExpiredException + * + * @deprecated might be refactored or removed before 7.0.0 */ + @Deprecated protected VaadinSession getExistingApplication(HttpServletRequest request, boolean allowSessionCreation) throws MalformedURLException, SessionExpiredException { @@ -1330,7 +1375,10 @@ public class VaadinServlet extends HttpServlet implements Constants { * * @param request * @return + * + * @deprecated might be refactored or removed before 7.0.0 */ + @Deprecated protected String getRequestPathInfo(HttpServletRequest request) { return request.getPathInfo(); } @@ -1343,7 +1391,10 @@ public class VaadinServlet extends HttpServlet implements Constants { * @param resource * the Theme resource. * @return External URI specifying the resource + * + * @deprecated might be refactored or removed before 7.0.0 */ + @Deprecated public String getResourceLocation(String theme, ThemeResource resource) { if (resourcePath == null) { @@ -1368,6 +1419,13 @@ public class VaadinServlet extends HttpServlet implements Constants { } } + /** + * @param session + * @return + * + * @deprecated might be refactored or removed before 7.0.0 + */ + @Deprecated protected VaadinSession getApplicationContext(final HttpSession session) { VaadinSession sessionApplication = VaadinSession .getForSession(new WrappedHttpSession(session)); @@ -1403,6 +1461,8 @@ public class VaadinServlet extends HttpServlet implements Constants { * * @param application * @return + * + * @deprecated might be refactored or removed before 7.0.0 */ @Deprecated public CommunicationManager createCommunicationManager( @@ -1416,7 +1476,10 @@ public class VaadinServlet extends HttpServlet implements Constants { * * @param unsafe * @return a safe string to be added inside an html tag + * + * @deprecated might be refactored or removed before 7.0.0 */ + @Deprecated public static final String safeEscapeForHtml(String unsafe) { if (null == unsafe) { return null; diff --git a/server/src/com/vaadin/server/VaadinServletSession.java b/server/src/com/vaadin/server/VaadinServletSession.java index 72b744da72..b2e3b9f54c 100644 --- a/server/src/com/vaadin/server/VaadinServletSession.java +++ b/server/src/com/vaadin/server/VaadinServletSession.java @@ -33,7 +33,10 @@ import com.vaadin.util.CurrentInstance; * * @author Vaadin Ltd. * @since 3.1 + * + * @deprecated might be refactored or removed before 7.0.0 */ +@Deprecated @SuppressWarnings("serial") public class VaadinServletSession extends VaadinSession { diff --git a/server/src/com/vaadin/server/VaadinSession.java b/server/src/com/vaadin/server/VaadinSession.java index 42194b2609..f0e3ec4895 100644 --- a/server/src/com/vaadin/server/VaadinSession.java +++ b/server/src/com/vaadin/server/VaadinSession.java @@ -58,7 +58,6 @@ import com.vaadin.util.ReflectTools; * data. * * @author Vaadin Ltd - * @version @VERSION@ * @since 7.0.0 */ @SuppressWarnings("serial") @@ -81,7 +80,7 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable { * An event sent to {@link #start(SessionStartEvent)} when a new Application * is being started. * - * @since 7.0 + * @deprecated might be refactored or removed before 7.0.0 */ @Deprecated public static class SessionStartEvent implements Serializable { @@ -223,7 +222,9 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable { * Get the web browser associated with this session. * * @return + * @deprecated might be refactored or removed before 7.0.0 */ + @Deprecated public WebBrowser getBrowser() { return browser; } @@ -264,6 +265,12 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable { return session; } + /** + * @return + * + * @deprecated might be refactored or removed before 7.0.0 + */ + @Deprecated public AbstractCommunicationManager getApplicationManager() { return communicationManager; } @@ -280,6 +287,8 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable { * </p> * * @return the application's URL. + * + * @deprecated might be refactored or removed before 7.0.0 */ @Deprecated public URL getURL() { @@ -294,6 +303,8 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable { * redirected to the application logout url set with * {@link #setLogoutURL(String)}. If the logout url has not been set, the * browser window is reloaded and the application is restarted. + * + * @deprecated might be refactored or removed before 7.0.0 */ @Deprecated public void close() { @@ -303,6 +314,12 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable { } } + /** + * @param underlyingSession + * @return + * + * @deprecated might be refactored or removed before 7.0.0 + */ @Deprecated public static VaadinSession getForSession(WrappedSession underlyingSession) { Object attribute = underlyingSession.getAttribute(VaadinSession.class @@ -316,6 +333,10 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable { return null; } + /** + * + * @deprecated might be refactored or removed before 7.0.0 + */ @Deprecated public void removeFromSession() { assert (getForSession(session) == this); @@ -323,6 +344,11 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable { session.setAttribute(VaadinSession.class.getName(), null); } + /** + * @param session + * + * @deprecated might be refactored or removed before 7.0.0 + */ @Deprecated public void storeInSession(WrappedSession session) { session.setAttribute(VaadinSession.class.getName(), this); @@ -350,6 +376,7 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable { * the application start event containing details required for * starting the application. * + * @deprecated might be refactored or removed before 7.0.0 */ @Deprecated public void start(SessionStartEvent event) { @@ -369,6 +396,8 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable { * * @return <code>true</code> if the application is running, * <code>false</code> if not. + * + * @deprecated might be refactored or removed before 7.0.0 */ @Deprecated public boolean isRunning() { @@ -418,7 +447,10 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable { * * This event is sent each time a window is removed from the application * with {@link com.vaadin.server.VaadinSession#removeWindow(Window)}. + * + * @deprecated might be refactored or removed before 7.0.0 */ + @Deprecated public static class WindowDetachEvent extends EventObject { private final Window window; @@ -460,7 +492,10 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable { * * This event is sent each time a window is attached tothe application with * {@link com.vaadin.server.VaadinSession#addWindow(Window)}. + * + * @deprecated might be refactored or removed before 7.0.0 */ + @Deprecated public static class WindowAttachEvent extends EventObject { private final Window window; @@ -535,6 +570,8 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable { * </p> * * @return the URL. + * + * @deprecated might be refactored or removed before 7.0.0 */ @Deprecated public String getLogoutURL() { @@ -550,6 +587,8 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable { * * @param logoutURL * the logoutURL to set. + * + * @deprecated might be refactored or removed before 7.0.0 */ @Deprecated public void setLogoutURL(String logoutURL) { @@ -646,6 +685,8 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable { * @see WrappedRequest#getBrowserDetails() * * @since 7.0 + * + * @deprecated might be refactored or removed before 7.0.0 */ @Deprecated public Class<? extends UI> getUIClass(WrappedRequest request) { @@ -662,6 +703,8 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable { * @param request * @param uiClass * @return + * + * @deprecated might be refactored or removed before 7.0.0 */ @Deprecated protected <T extends UI> T createUIInstance(WrappedRequest request, @@ -688,6 +731,8 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable { * provided). * * @since 7.0.0 + * + * @deprecated might be refactored or removed before 7.0.0 */ @Deprecated public UIProvider getUiProvider(WrappedRequest request, Class<?> uiClass) { @@ -718,6 +763,13 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable { return provider; } + /** + * @param request + * @param uiClass + * @return + * + * @deprecated might be refactored or removed before 7.0.0 + */ @Deprecated private UIProvider doGetUiProvider(WrappedRequest request, Class<?> uiClass) { int providersSize = uiProviders.size(); @@ -867,6 +919,8 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable { * @see #createUI(WrappedRequest) * * @since 7.0 + * + * @deprecated might be refactored or removed before 7.0.0 */ @Deprecated public UI getUIForRequest(WrappedRequest request) { @@ -890,6 +944,12 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable { return uI; } + /** + * @param request + * @return + * + * @deprecated might be refactored or removed before 7.0.0 + */ @Deprecated private UI findExistingUi(WrappedRequest request) { // Check if some UI provider has an existing UI available @@ -933,6 +993,12 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable { return null; } + /** + * @param request + * @return + * + * @deprecated might be refactored or removed before 7.0.0 + */ @Deprecated public UI createUI(WrappedRequest request) { Class<? extends UI> uiClass = getUIClass(request); @@ -976,6 +1042,8 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable { * @return a UI id, or <code>null</code> if no UI id is defined * * @since 7.0 + * + * @deprecated might be refactored or removed before 7.0.0 */ @Deprecated private static Integer getUIId(WrappedRequest request) { @@ -1016,7 +1084,10 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable { * @param connector * A connector that has not yet been assigned an id. * @return A new id for the connector + * + * @deprecated might be refactored or removed before 7.0.0 */ + @Deprecated public String createConnectorId(ClientConnector connector) { return String.valueOf(connectorIdSequence++); } @@ -1081,6 +1152,8 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable { * @param response * the bootstrap response event for which listeners should be * fired + * + * @deprecated might be refactored or removed before 7.0.0 */ @Deprecated public void modifyBootstrapResponse(BootstrapResponse response) { @@ -1098,7 +1171,10 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable { * @see #isUIAlive(UI) * * @since 7.0.0 + * + * @deprecated might be refactored or removed before 7.0.0 */ + @Deprecated public void closeInactiveUIs() { for (Iterator<UI> i = uIs.values().iterator(); i.hasNext();) { UI ui = i.next(); @@ -1167,7 +1243,10 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable { * @param ui * The UI whose status to check * @return true if the UI is alive, false if it could be removed. + * + * @deprecated might be refactored or removed before 7.0.0 */ + @Deprecated protected boolean isUIAlive(UI ui) { long now = System.currentTimeMillis(); if (getHeartbeatTimeout() >= 0 |