]> source.dussan.org Git - vaadin-framework.git/commitdiff
Rename VaadinRequest.getRequestPathInfo() to getPathInfo() (#9749) 03/303/1
authorLeif Åstrand <leif@vaadin.com>
Tue, 20 Nov 2012 09:46:12 +0000 (11:46 +0200)
committerLeif Åstrand <leif@vaadin.com>
Tue, 20 Nov 2012 12:43:11 +0000 (14:43 +0200)
Change-Id: Ibf460de507b4eea156a794304476b547bf63291a

17 files changed:
server/src/com/vaadin/server/AbstractCommunicationManager.java
server/src/com/vaadin/server/BrowserPopupUIProvider.java
server/src/com/vaadin/server/CommunicationManager.java
server/src/com/vaadin/server/ConnectorResourceHandler.java
server/src/com/vaadin/server/GlobalResourceHandler.java
server/src/com/vaadin/server/LegacyApplicationUIProvider.java
server/src/com/vaadin/server/ServletPortletHelper.java
server/src/com/vaadin/server/VaadinPortletRequest.java
server/src/com/vaadin/server/VaadinRequest.java
server/src/com/vaadin/server/VaadinServletRequest.java
uitest/src/com/vaadin/tests/Parameters.java
uitest/src/com/vaadin/tests/application/NavigateWithOngoingXHR.java
uitest/src/com/vaadin/tests/applicationservlet/InitParamUIProvider.java
uitest/src/com/vaadin/tests/components/ui/LazyInitUIs.java
uitest/src/com/vaadin/tests/minitutorials/v7a1/UsingXyzWhenInitializing.java
uitest/src/com/vaadin/tests/tickets/Ticket1589.java
uitest/src/com/vaadin/tests/tickets/Ticket2292.java

index dc987530bd7ea3048700b43875809222d0722087..74e5d5fd20c8b89ab9d155f9456262f0aaee3696 100644 (file)
@@ -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)
index 23036dabeda3cd4b0a165d69d860f1f7054a6e40..6259fb605d37715cf245533b99041e28116aa366 100644 (file)
@@ -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 {
index 19a431c882b38cd3253cfca62d5b3a1d6672e362..6d60789be740e45a388964912bcb1aa7caf098a5 100644 (file)
@@ -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 {
index dd785e97b8dc015084d9e7892793bca074090883..5cd218471cf411ee920094807c115a4f5a7b69e3 100644 (file)
@@ -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;
index 23c294650e3809f2238335c5fe588c7b23391715..119f9cdae08b088cee572e28e183cb3cf00845ca 100644 (file)
@@ -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;
index b3e8af818450a6e092f0b80f65018a67a9495491..d139ee19f646effc7bc2210d22c4da439a8c7f46 100644 (file)
@@ -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);
index 6fb03ab26541136569edd7e7c73c0d6c43cb3dfd..07218f9abd9fe23fd624531d560d1033f889b817 100644 (file)
@@ -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;
index f4ad0403214f4fdac95e03146b13653e77fa6bf8..259b227b42743dc5442e72649bad0c0b3857c21e 100644 (file)
@@ -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();
index f5786c9b80abb65371edbef09249bd17a23611aa..9e454761f20ab95113c255ddaefdd505fed9448e 100644 (file)
@@ -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
index 5b4b87624405966c0b750c93273babb8c3a82deb..e0ad94c18c5c19cb28fd9ac50c49ff31f6018adc 100644 (file)
@@ -48,11 +48,6 @@ public class VaadinServletRequest extends HttpServletRequestWrapper implements
         this.vaadinService = vaadinService;
     }
 
-    @Override
-    public String getRequestPathInfo() {
-        return getPathInfo();
-    }
-
     @Override
     public WrappedSession getWrappedSession() {
         return getWrappedSession(true);
index feb9a8cf6bf35afcbb21158505129853159417d6..934a98e910b427bd9079aa1c67123d826409ad1b 100644 (file)
@@ -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();
index 5e3094b66c5fe6c1680ca7c128ba3577fe2c4487..d32ecb583d3ad88dcb627bc3b888d71ee2c0f289 100644 (file)
@@ -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");
index b4f29dda06f6ccdb71e2a75d09718d6052c8e795..e62cd9a4f9db80584b40fd09d1be43f65f691369 100644 (file)
@@ -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 {
index 57fc9f3e6261263cc604304f39a2c6466086ed71..984ac69d6e97dc1878653c09e47e1f27278514bc 100644 (file)
@@ -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();
index c4d496641d1977cfd16adc570960f8ed20c6fc12..6cf0514df4472e1800e0b339a0b9df7debcb98a2 100644 (file)
@@ -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 {
index 9b5be40aa3c61ca7f780c86794bbd67e44dfe2cc..db6fa682fc916408864c6c979afec2d1af5c5478 100644 (file)
@@ -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")) {
index 2fd843ede64679de1365255ae5f668b3df957135..e81ad3185aacbbfd3a20924e33e93bad939219e6 100644 (file)
@@ -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;