aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2012-11-20 11:46:12 +0200
committerLeif Åstrand <leif@vaadin.com>2012-11-20 14:43:11 +0200
commit276d5f405910e6d91610a8e15697b8383448da84 (patch)
tree341168f64433a20f9c48e3ea11e3f1b71a74af93
parent65981705b433d9ed02c667a2d838ced2b6314573 (diff)
downloadvaadin-framework-276d5f405910e6d91610a8e15697b8383448da84.tar.gz
vaadin-framework-276d5f405910e6d91610a8e15697b8383448da84.zip
Rename VaadinRequest.getRequestPathInfo() to getPathInfo() (#9749)
Change-Id: Ibf460de507b4eea156a794304476b547bf63291a
-rw-r--r--server/src/com/vaadin/server/AbstractCommunicationManager.java4
-rw-r--r--server/src/com/vaadin/server/BrowserPopupUIProvider.java2
-rw-r--r--server/src/com/vaadin/server/CommunicationManager.java2
-rw-r--r--server/src/com/vaadin/server/ConnectorResourceHandler.java4
-rw-r--r--server/src/com/vaadin/server/GlobalResourceHandler.java4
-rw-r--r--server/src/com/vaadin/server/LegacyApplicationUIProvider.java2
-rw-r--r--server/src/com/vaadin/server/ServletPortletHelper.java2
-rw-r--r--server/src/com/vaadin/server/VaadinPortletRequest.java2
-rw-r--r--server/src/com/vaadin/server/VaadinRequest.java2
-rw-r--r--server/src/com/vaadin/server/VaadinServletRequest.java5
-rw-r--r--uitest/src/com/vaadin/tests/Parameters.java2
-rw-r--r--uitest/src/com/vaadin/tests/application/NavigateWithOngoingXHR.java2
-rw-r--r--uitest/src/com/vaadin/tests/applicationservlet/InitParamUIProvider.java2
-rw-r--r--uitest/src/com/vaadin/tests/components/ui/LazyInitUIs.java2
-rw-r--r--uitest/src/com/vaadin/tests/minitutorials/v7a1/UsingXyzWhenInitializing.java2
-rw-r--r--uitest/src/com/vaadin/tests/tickets/Ticket1589.java2
-rw-r--r--uitest/src/com/vaadin/tests/tickets/Ticket2292.java2
17 files changed, 19 insertions, 24 deletions
diff --git a/server/src/com/vaadin/server/AbstractCommunicationManager.java b/server/src/com/vaadin/server/AbstractCommunicationManager.java
index dc987530bd..74e5d5fd20 100644
--- a/server/src/com/vaadin/server/AbstractCommunicationManager.java
+++ b/server/src/com/vaadin/server/AbstractCommunicationManager.java
@@ -2632,7 +2632,7 @@ public abstract class AbstractCommunicationManager implements Serializable {
public void serveDependencyResource(VaadinRequest request,
VaadinResponse response) throws IOException {
- String pathInfo = request.getRequestPathInfo();
+ String pathInfo = request.getPathInfo();
// + 2 to also remove beginning and ending slashes
String resourceName = pathInfo
.substring(ApplicationConstants.DEPENDENCY_RESOURCE_PREFIX
@@ -2734,7 +2734,7 @@ public abstract class AbstractCommunicationManager implements Serializable {
* #createReceiverUrl
*/
- String pathInfo = request.getRequestPathInfo();
+ String pathInfo = request.getPathInfo();
// strip away part until the data we are interested starts
int startOfData = pathInfo
.indexOf(ServletPortletHelper.UPLOAD_URL_PREFIX)
diff --git a/server/src/com/vaadin/server/BrowserPopupUIProvider.java b/server/src/com/vaadin/server/BrowserPopupUIProvider.java
index 23036dabed..6259fb605d 100644
--- a/server/src/com/vaadin/server/BrowserPopupUIProvider.java
+++ b/server/src/com/vaadin/server/BrowserPopupUIProvider.java
@@ -40,7 +40,7 @@ public class BrowserPopupUIProvider extends UIProvider {
@Override
public Class<? extends UI> getUIClass(UIClassSelectionEvent event) {
- String requestPathInfo = event.getRequest().getRequestPathInfo();
+ String requestPathInfo = event.getRequest().getPathInfo();
if (path.equals(requestPathInfo)) {
return uiClass;
} else {
diff --git a/server/src/com/vaadin/server/CommunicationManager.java b/server/src/com/vaadin/server/CommunicationManager.java
index 19a431c882..6d60789be7 100644
--- a/server/src/com/vaadin/server/CommunicationManager.java
+++ b/server/src/com/vaadin/server/CommunicationManager.java
@@ -53,7 +53,7 @@ public class CommunicationManager extends AbstractCommunicationManager {
return new BootstrapHandler() {
@Override
protected String getServiceUrl(BootstrapContext context) {
- String pathInfo = context.getRequest().getRequestPathInfo();
+ String pathInfo = context.getRequest().getPathInfo();
if (pathInfo == null) {
return null;
} else {
diff --git a/server/src/com/vaadin/server/ConnectorResourceHandler.java b/server/src/com/vaadin/server/ConnectorResourceHandler.java
index dd785e97b8..5cd218471c 100644
--- a/server/src/com/vaadin/server/ConnectorResourceHandler.java
+++ b/server/src/com/vaadin/server/ConnectorResourceHandler.java
@@ -26,7 +26,7 @@ public class ConnectorResourceHandler implements RequestHandler {
@Override
public boolean handleRequest(VaadinSession session, VaadinRequest request,
VaadinResponse response) throws IOException {
- String requestPath = request.getRequestPathInfo();
+ String requestPath = request.getPathInfo();
if (requestPath == null) {
return false;
}
@@ -80,7 +80,7 @@ public class ConnectorResourceHandler implements RequestHandler {
VaadinResponse response, String logMessage) throws IOException {
getLogger().log(Level.WARNING, logMessage);
response.sendError(HttpServletResponse.SC_NOT_FOUND,
- request.getRequestPathInfo() + " can not be found");
+ request.getPathInfo() + " can not be found");
// Request handled (though not in a nice way)
return true;
diff --git a/server/src/com/vaadin/server/GlobalResourceHandler.java b/server/src/com/vaadin/server/GlobalResourceHandler.java
index 23c294650e..119f9cdae0 100644
--- a/server/src/com/vaadin/server/GlobalResourceHandler.java
+++ b/server/src/com/vaadin/server/GlobalResourceHandler.java
@@ -68,7 +68,7 @@ public class GlobalResourceHandler implements RequestHandler {
@Override
public boolean handleRequest(VaadinSession session, VaadinRequest request,
VaadinResponse response) throws IOException {
- String pathInfo = request.getRequestPathInfo();
+ String pathInfo = request.getPathInfo();
if (pathInfo == null) {
return false;
}
@@ -229,7 +229,7 @@ public class GlobalResourceHandler implements RequestHandler {
VaadinResponse response, String logMessage) throws IOException {
getLogger().log(Level.WARNING, logMessage);
response.sendError(HttpServletResponse.SC_NOT_FOUND,
- request.getRequestPathInfo() + " can not be found");
+ request.getPathInfo() + " can not be found");
// Request handled (though not in a nice way)
return true;
diff --git a/server/src/com/vaadin/server/LegacyApplicationUIProvider.java b/server/src/com/vaadin/server/LegacyApplicationUIProvider.java
index b3e8af8184..d139ee19f6 100644
--- a/server/src/com/vaadin/server/LegacyApplicationUIProvider.java
+++ b/server/src/com/vaadin/server/LegacyApplicationUIProvider.java
@@ -76,7 +76,7 @@ public abstract class LegacyApplicationUIProvider extends UIProvider {
private UI getUIInstance(UIProviderEvent event) {
VaadinRequest request = event.getRequest();
- String pathInfo = request.getRequestPathInfo();
+ String pathInfo = request.getPathInfo();
String name = null;
if (pathInfo != null && pathInfo.length() > 0) {
Matcher matcher = WINDOW_NAME_PATTERN.matcher(pathInfo);
diff --git a/server/src/com/vaadin/server/ServletPortletHelper.java b/server/src/com/vaadin/server/ServletPortletHelper.java
index 6fb03ab265..07218f9abd 100644
--- a/server/src/com/vaadin/server/ServletPortletHelper.java
+++ b/server/src/com/vaadin/server/ServletPortletHelper.java
@@ -79,7 +79,7 @@ class ServletPortletHelper implements Serializable {
}
private static boolean hasPathPrefix(VaadinRequest request, String prefix) {
- String pathInfo = request.getRequestPathInfo();
+ String pathInfo = request.getPathInfo();
if (pathInfo == null) {
return false;
diff --git a/server/src/com/vaadin/server/VaadinPortletRequest.java b/server/src/com/vaadin/server/VaadinPortletRequest.java
index f4ad040321..259b227b42 100644
--- a/server/src/com/vaadin/server/VaadinPortletRequest.java
+++ b/server/src/com/vaadin/server/VaadinPortletRequest.java
@@ -97,7 +97,7 @@ public class VaadinPortletRequest implements VaadinRequest {
}
@Override
- public String getRequestPathInfo() {
+ public String getPathInfo() {
if (request instanceof ResourceRequest) {
ResourceRequest resourceRequest = (ResourceRequest) request;
String resourceID = resourceRequest.getResourceID();
diff --git a/server/src/com/vaadin/server/VaadinRequest.java b/server/src/com/vaadin/server/VaadinRequest.java
index f5786c9b80..9e454761f2 100644
--- a/server/src/com/vaadin/server/VaadinRequest.java
+++ b/server/src/com/vaadin/server/VaadinRequest.java
@@ -122,7 +122,7 @@ public interface VaadinRequest extends Serializable {
*
* @see javax.servlet.http.HttpServletRequest#getPathInfo()
*/
- public String getRequestPathInfo();
+ public String getPathInfo();
/**
* Returns the portion of the request URI that indicates the context of the
diff --git a/server/src/com/vaadin/server/VaadinServletRequest.java b/server/src/com/vaadin/server/VaadinServletRequest.java
index 5b4b876244..e0ad94c18c 100644
--- a/server/src/com/vaadin/server/VaadinServletRequest.java
+++ b/server/src/com/vaadin/server/VaadinServletRequest.java
@@ -49,11 +49,6 @@ public class VaadinServletRequest extends HttpServletRequestWrapper implements
}
@Override
- public String getRequestPathInfo() {
- return getPathInfo();
- }
-
- @Override
public WrappedSession getWrappedSession() {
return getWrappedSession(true);
}
diff --git a/uitest/src/com/vaadin/tests/Parameters.java b/uitest/src/com/vaadin/tests/Parameters.java
index feb9a8cf6b..934a98e910 100644
--- a/uitest/src/com/vaadin/tests/Parameters.java
+++ b/uitest/src/com/vaadin/tests/Parameters.java
@@ -110,7 +110,7 @@ public class Parameters extends com.vaadin.server.LegacyApplication implements
public boolean handleRequest(VaadinSession session,
VaadinRequest request, VaadinResponse response) throws IOException {
context.setValue("Context not available");
- relative.setValue(request.getRequestPathInfo());
+ relative.setValue(request.getPathInfo());
params.removeAllItems();
Map<String, String[]> parameters = request.getParameterMap();
diff --git a/uitest/src/com/vaadin/tests/application/NavigateWithOngoingXHR.java b/uitest/src/com/vaadin/tests/application/NavigateWithOngoingXHR.java
index 5e3094b66c..d32ecb583d 100644
--- a/uitest/src/com/vaadin/tests/application/NavigateWithOngoingXHR.java
+++ b/uitest/src/com/vaadin/tests/application/NavigateWithOngoingXHR.java
@@ -35,7 +35,7 @@ public class NavigateWithOngoingXHR extends AbstractTestUI {
public boolean handleRequest(VaadinSession session,
VaadinRequest request, VaadinResponse response)
throws IOException {
- if ("/slowRequestHandler".equals(request.getRequestPathInfo())) {
+ if ("/slowRequestHandler".equals(request.getPathInfo())) {
// Make the navigation request last longer to keep the
// communication error visible
// System.out.println("Got slow content request");
diff --git a/uitest/src/com/vaadin/tests/applicationservlet/InitParamUIProvider.java b/uitest/src/com/vaadin/tests/applicationservlet/InitParamUIProvider.java
index b4f29dda06..e62cd9a4f9 100644
--- a/uitest/src/com/vaadin/tests/applicationservlet/InitParamUIProvider.java
+++ b/uitest/src/com/vaadin/tests/applicationservlet/InitParamUIProvider.java
@@ -27,7 +27,7 @@ public class InitParamUIProvider extends UIProvider {
@Override
public Class<? extends UI> getUIClass(UIClassSelectionEvent event) {
VaadinRequest request = event.getRequest();
- String pathInfo = request.getRequestPathInfo();
+ String pathInfo = request.getPathInfo();
if ("/test".equals(pathInfo)) {
return BasicJavaScriptComponent.class;
} else {
diff --git a/uitest/src/com/vaadin/tests/components/ui/LazyInitUIs.java b/uitest/src/com/vaadin/tests/components/ui/LazyInitUIs.java
index 57fc9f3e62..984ac69d6e 100644
--- a/uitest/src/com/vaadin/tests/components/ui/LazyInitUIs.java
+++ b/uitest/src/com/vaadin/tests/components/ui/LazyInitUIs.java
@@ -87,7 +87,7 @@ public class LazyInitUIs extends AbstractTestUIProvider {
public static Label getRequestInfo(String name, VaadinRequest request) {
String info = name;
- info += "<br />pathInfo: " + request.getRequestPathInfo();
+ info += "<br />pathInfo: " + request.getPathInfo();
info += "<br />parameters: " + request.getParameterMap().keySet();
info += "<br />uri fragment: "
+ Page.getCurrent().getLocation().getFragment();
diff --git a/uitest/src/com/vaadin/tests/minitutorials/v7a1/UsingXyzWhenInitializing.java b/uitest/src/com/vaadin/tests/minitutorials/v7a1/UsingXyzWhenInitializing.java
index c4d496641d..6cf0514df4 100644
--- a/uitest/src/com/vaadin/tests/minitutorials/v7a1/UsingXyzWhenInitializing.java
+++ b/uitest/src/com/vaadin/tests/minitutorials/v7a1/UsingXyzWhenInitializing.java
@@ -44,7 +44,7 @@ public class UsingXyzWhenInitializing extends UI {
layout.addComponent(new Label("Hello " + name));
- String pathInfo = request.getRequestPathInfo();
+ String pathInfo = request.getPathInfo();
if ("/viewSource".equals(pathInfo)) {
layout.addComponent(new Label("This is the source"));
} else {
diff --git a/uitest/src/com/vaadin/tests/tickets/Ticket1589.java b/uitest/src/com/vaadin/tests/tickets/Ticket1589.java
index 9b5be40aa3..db6fa682fc 100644
--- a/uitest/src/com/vaadin/tests/tickets/Ticket1589.java
+++ b/uitest/src/com/vaadin/tests/tickets/Ticket1589.java
@@ -54,7 +54,7 @@ class MyDynamicResource implements RequestHandler {
@Override
public boolean handleRequest(VaadinSession session,
VaadinRequest request, VaadinResponse response) throws IOException {
- String relativeUri = request.getRequestPathInfo();
+ String relativeUri = request.getPathInfo();
// Catch the given URI that identifies the resource, otherwise let other
// URI handlers or the Application to handle the response.
if (!relativeUri.startsWith("myresource")) {
diff --git a/uitest/src/com/vaadin/tests/tickets/Ticket2292.java b/uitest/src/com/vaadin/tests/tickets/Ticket2292.java
index 2fd843ede6..e81ad3185a 100644
--- a/uitest/src/com/vaadin/tests/tickets/Ticket2292.java
+++ b/uitest/src/com/vaadin/tests/tickets/Ticket2292.java
@@ -50,7 +50,7 @@ public class Ticket2292 extends com.vaadin.server.LegacyApplication implements
@Override
public boolean handleRequest(VaadinSession session,
VaadinRequest request, VaadinResponse response) throws IOException {
- String relativeUri = request.getRequestPathInfo();
+ String relativeUri = request.getPathInfo();
if (!relativeUri.contains("icon.png")) {
return false;