]> source.dussan.org Git - vaadin-framework.git/commitdiff
Rename BackgroundMessage -> NoLoadingIndicator (#15373)
authorLeif Åstrand <leif@vaadin.com>
Tue, 13 Jan 2015 19:55:26 +0000 (21:55 +0200)
committerVaadin Code Review <review@vaadin.com>
Tue, 13 Jan 2015 20:15:00 +0000 (20:15 +0000)
Change-Id: Icc25e5727880baa9dceba3394522b3c5b3a4314f

client-compiler/src/com/vaadin/server/widgetsetutils/metadata/ServerRpcVisitor.java
client/src/com/vaadin/client/ApplicationConnection.java
client/src/com/vaadin/client/metadata/TypeDataStore.java
shared/src/com/vaadin/shared/annotations/BackgroundMessage.java [deleted file]
shared/src/com/vaadin/shared/annotations/NoLoadingIndicator.java [new file with mode: 0644]
shared/src/com/vaadin/shared/data/DataRequestRpc.java
shared/src/com/vaadin/shared/ui/progressindicator/ProgressIndicatorServerRpc.java
shared/src/com/vaadin/shared/ui/ui/UIServerRpc.java

index 7efdf9db81dfa0580e3e8c08d6ecd4c3913d7918..86ece28041a91b4c1be438394d06b652cc420759 100644 (file)
@@ -24,7 +24,7 @@ import com.google.gwt.core.ext.typeinfo.JClassType;
 import com.google.gwt.core.ext.typeinfo.JMethod;
 import com.google.gwt.core.ext.typeinfo.JType;
 import com.vaadin.client.metadata.TypeDataStore.MethodAttribute;
-import com.vaadin.shared.annotations.BackgroundMessage;
+import com.vaadin.shared.annotations.NoLoadingIndicator;
 import com.vaadin.shared.annotations.Delayed;
 
 public class ServerRpcVisitor extends TypeVisitor {
@@ -52,9 +52,9 @@ public class ServerRpcVisitor extends TypeVisitor {
                         }
                     }
 
-                    if (method.getAnnotation(BackgroundMessage.class) != null) {
+                    if (method.getAnnotation(NoLoadingIndicator.class) != null) {
                         bundle.setMethodAttribute(type, method,
-                                MethodAttribute.BACKGROUND_MESSAGE);
+                                MethodAttribute.NO_LOADING_INDICATOR);
                     }
 
                     bundle.setNeedsParamTypes(type, method);
index c00e5a8dae173fc71dccc117d92d879892d62b8a..6abaf28eda2774a78ceb8ae6b4a139708cee1101 100644 (file)
@@ -2794,7 +2794,7 @@ public class ApplicationConnection implements HasHandlers {
                         parameterTypes = method.getParameterTypes();
 
                         showLoadingIndicator |= !TypeDataStore
-                                .isBackgroundMessage(method);
+                                .isNoLoadingIndicator(method);
                     } catch (NoDataException e) {
                         throw new RuntimeException("No type data for "
                                 + invocation.toString(), e);
index adbf24d411cb846681eae44303def0a6c28d70a6..46f26f1b25509f4febd04f88725fa46154ea4f96 100644 (file)
@@ -29,7 +29,7 @@ import com.vaadin.shared.annotations.NoLayout;
 
 public class TypeDataStore {
     public static enum MethodAttribute {
-        DELAYED, LAST_ONLY, NO_LAYOUT, BACKGROUND_MESSAGE;
+        DELAYED, LAST_ONLY, NO_LAYOUT, NO_LOADING_INDICATOR;
     }
 
     private static final String CONSTRUCTOR_NAME = "!new";
@@ -219,8 +219,8 @@ public class TypeDataStore {
         return hasMethodAttribute(method, MethodAttribute.DELAYED);
     }
 
-    public static boolean isBackgroundMessage(Method method) {
-        return hasMethodAttribute(method, MethodAttribute.BACKGROUND_MESSAGE);
+    public static boolean isNoLoadingIndicator(Method method) {
+        return hasMethodAttribute(method, MethodAttribute.NO_LOADING_INDICATOR);
     }
 
     private static boolean hasMethodAttribute(Method method,
diff --git a/shared/src/com/vaadin/shared/annotations/BackgroundMessage.java b/shared/src/com/vaadin/shared/annotations/BackgroundMessage.java
deleted file mode 100644 (file)
index 885c0de..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright 2000-2014 Vaadin Ltd.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.vaadin.shared.annotations;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Target;
-
-/**
- * Annotation used to mark server RPC methods that perform background tasks that
- * are transparent to the user. The framework will show a loading indicator when
- * sending requests for RPC methods that are not marked with this annotation.
- * The loading indicator is hidden once a response is received.
- * 
- * @since
- * @author Vaadin Ltd
- */
-@Target(ElementType.METHOD)
-@Documented
-public @interface BackgroundMessage {
-    // Just an empty marker annotation
-}
diff --git a/shared/src/com/vaadin/shared/annotations/NoLoadingIndicator.java b/shared/src/com/vaadin/shared/annotations/NoLoadingIndicator.java
new file mode 100644 (file)
index 0000000..8455b4c
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.shared.annotations;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation used to mark server RPC methods for which it isn't necessary to
+ * show the loading indicator. The framework will show a loading indicator when
+ * sending requests for RPC methods that are not marked with this annotation.
+ * The loading indicator is hidden once a response is received.
+ * 
+ * @since
+ * @author Vaadin Ltd
+ */
+@Target(ElementType.METHOD)
+@Documented
+public @interface NoLoadingIndicator {
+    // Just an empty marker annotation
+}
index c2a13d470c7a58ef7da1ca841952ff90b67394c3..0d9b919a4e3e53c79f08728ece27b5dc113a8358 100644 (file)
@@ -16,7 +16,7 @@
 
 package com.vaadin.shared.data;
 
-import com.vaadin.shared.annotations.BackgroundMessage;
+import com.vaadin.shared.annotations.NoLoadingIndicator;
 import com.vaadin.shared.annotations.Delayed;
 import com.vaadin.shared.communication.ServerRpc;
 
@@ -40,7 +40,7 @@ public interface DataRequestRpc extends ServerRpc {
      * @param cacheSize
      *            the number of cached rows
      */
-    @BackgroundMessage
+    @NoLoadingIndicator
     public void requestRows(int firstRowIndex, int numberOfRows,
             int firstCachedRowIndex, int cacheSize);
 
index 54153005e3a90d9ce6a8c272b4adaf33089a70d9..f541395cef322d30da87b6c5717dbbbf44160d58 100644 (file)
  */
 package com.vaadin.shared.ui.progressindicator;
 
-import com.vaadin.shared.annotations.BackgroundMessage;
+import com.vaadin.shared.annotations.NoLoadingIndicator;
 import com.vaadin.shared.communication.ServerRpc;
 
 public interface ProgressIndicatorServerRpc extends ServerRpc {
-    @BackgroundMessage
+    @NoLoadingIndicator
     public void poll();
 }
index 20e4dbdf4c99358d340fd946808cd63f6484eeab..887ea760b35d502c4cb9241be3ad085421169337 100644 (file)
@@ -15,7 +15,7 @@
  */
 package com.vaadin.shared.ui.ui;
 
-import com.vaadin.shared.annotations.BackgroundMessage;
+import com.vaadin.shared.annotations.NoLoadingIndicator;
 import com.vaadin.shared.annotations.Delayed;
 import com.vaadin.shared.communication.ServerRpc;
 import com.vaadin.shared.ui.ClickRpc;
@@ -28,7 +28,7 @@ public interface UIServerRpc extends ClickRpc, ServerRpc {
     @Delayed(lastOnly = true)
     public void scroll(int scrollTop, int scrollLeft);
 
-    @BackgroundMessage
+    @NoLoadingIndicator
     @Delayed(lastOnly = true)
     /*
      * @Delayed just to get lastOnly semantics, sendPendingVariableChanges()