From 1ab6b64088d21047d4e013cbf307384e1c8080e5 Mon Sep 17 00:00:00 2001
From: Ignacio Baca Moreno-Torres <ignacio@bacamt.com>
Date: Fri, 25 Nov 2016 21:04:11 +0100
Subject: [PATCH] Apply autorpc-gwt to auto-generate GWT RPC async interfaces

---
 app/mobile-war/pom.xml                        |  7 ++++
 .../shared/services/ServiceAlmanachAsync.java | 10 ------
 .../shared/services/ServiceCommentsAsync.java | 13 --------
 .../services/ServiceConnectionAsync.java      | 17 ----------
 .../shared/services/ServiceContactAsync.java  | 10 ------
 .../services/ServiceDashboardAsync.java       | 10 ------
 .../services/ServiceDocumentsAsync.java       | 24 --------------
 .../shared/services/ServiceMediaAsync.java    | 32 -------------------
 .../shared/services/ServiceNewsAsync.java     | 10 ------
 .../services/ServiceNotificationsAsync.java   | 14 --------
 .../shared/services/ServiceRSEAsync.java      | 13 --------
 .../shared/services/ServiceSearchAsync.java   | 10 ------
 .../shared/services/ServiceTasksAsync.java    | 14 --------
 .../navigation/ServiceNavigationAsync.java    | 13 --------
 14 files changed, 7 insertions(+), 190 deletions(-)
 delete mode 100644 app/mobile-war/src/main/java/com/silverpeas/mobile/shared/services/ServiceAlmanachAsync.java
 delete mode 100644 app/mobile-war/src/main/java/com/silverpeas/mobile/shared/services/ServiceCommentsAsync.java
 delete mode 100644 app/mobile-war/src/main/java/com/silverpeas/mobile/shared/services/ServiceConnectionAsync.java
 delete mode 100644 app/mobile-war/src/main/java/com/silverpeas/mobile/shared/services/ServiceContactAsync.java
 delete mode 100644 app/mobile-war/src/main/java/com/silverpeas/mobile/shared/services/ServiceDashboardAsync.java
 delete mode 100644 app/mobile-war/src/main/java/com/silverpeas/mobile/shared/services/ServiceDocumentsAsync.java
 delete mode 100644 app/mobile-war/src/main/java/com/silverpeas/mobile/shared/services/ServiceMediaAsync.java
 delete mode 100644 app/mobile-war/src/main/java/com/silverpeas/mobile/shared/services/ServiceNewsAsync.java
 delete mode 100644 app/mobile-war/src/main/java/com/silverpeas/mobile/shared/services/ServiceNotificationsAsync.java
 delete mode 100644 app/mobile-war/src/main/java/com/silverpeas/mobile/shared/services/ServiceRSEAsync.java
 delete mode 100644 app/mobile-war/src/main/java/com/silverpeas/mobile/shared/services/ServiceSearchAsync.java
 delete mode 100644 app/mobile-war/src/main/java/com/silverpeas/mobile/shared/services/ServiceTasksAsync.java
 delete mode 100644 app/mobile-war/src/main/java/com/silverpeas/mobile/shared/services/navigation/ServiceNavigationAsync.java

diff --git a/app/mobile-war/pom.xml b/app/mobile-war/pom.xml
index 550252930..d820111b3 100644
--- a/app/mobile-war/pom.xml
+++ b/app/mobile-war/pom.xml
@@ -98,6 +98,13 @@
       <version>${gwtVersion}</version>
       <type>jar</type>
     </dependency>
+    <dependency>
+      <groupId>com.intendia.gwt.autorpc</groupId>
+      <artifactId>autorpc-gwt-processor</artifactId>
+      <version>0.2</version>
+      <scope>provided</scope>
+      <optional>true</optional>
+    </dependency>
 
     <dependency>
       <groupId>org.silverpeas.components.delegatednews</groupId>
diff --git a/app/mobile-war/src/main/java/com/silverpeas/mobile/shared/services/ServiceAlmanachAsync.java b/app/mobile-war/src/main/java/com/silverpeas/mobile/shared/services/ServiceAlmanachAsync.java
deleted file mode 100644
index 9211df659..000000000
--- a/app/mobile-war/src/main/java/com/silverpeas/mobile/shared/services/ServiceAlmanachAsync.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package com.silverpeas.mobile.shared.services;
-
-import java.util.List;
-
-import com.google.gwt.user.client.rpc.AsyncCallback;
-import com.silverpeas.mobile.shared.dto.EventDetailDTO;
-
-public interface ServiceAlmanachAsync {
-	void getAlmanach(String instanceId, AsyncCallback<List<EventDetailDTO>> callback);
-}
diff --git a/app/mobile-war/src/main/java/com/silverpeas/mobile/shared/services/ServiceCommentsAsync.java b/app/mobile-war/src/main/java/com/silverpeas/mobile/shared/services/ServiceCommentsAsync.java
deleted file mode 100644
index 0048c07a3..000000000
--- a/app/mobile-war/src/main/java/com/silverpeas/mobile/shared/services/ServiceCommentsAsync.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package com.silverpeas.mobile.shared.services;
-
-import com.google.gwt.user.client.rpc.AsyncCallback;
-import com.silverpeas.mobile.shared.dto.comments.CommentDTO;
-
-import java.util.List;
-
-public interface ServiceCommentsAsync {
-  void getComments(String id, String type, final AsyncCallback<List<CommentDTO>> async);
-
-  void addComment(String id, String instanceId, String type, String message,
-      final AsyncCallback<CommentDTO> async);
-}
diff --git a/app/mobile-war/src/main/java/com/silverpeas/mobile/shared/services/ServiceConnectionAsync.java b/app/mobile-war/src/main/java/com/silverpeas/mobile/shared/services/ServiceConnectionAsync.java
deleted file mode 100644
index 1a703527a..000000000
--- a/app/mobile-war/src/main/java/com/silverpeas/mobile/shared/services/ServiceConnectionAsync.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.silverpeas.mobile.shared.services;
-
-import java.util.List;
-
-import com.google.gwt.user.client.rpc.AsyncCallback;
-import com.silverpeas.mobile.shared.dto.DetailUserDTO;
-import com.silverpeas.mobile.shared.dto.DomainDTO;
-
-
-public interface ServiceConnectionAsync {
-
-	void login(String login, String password, String domainId, AsyncCallback<DetailUserDTO> callback);
-
-	void getDomains(AsyncCallback<List<DomainDTO>> callback);
-
-	void logout(final AsyncCallback<Void> async);
-}
diff --git a/app/mobile-war/src/main/java/com/silverpeas/mobile/shared/services/ServiceContactAsync.java b/app/mobile-war/src/main/java/com/silverpeas/mobile/shared/services/ServiceContactAsync.java
deleted file mode 100644
index 81ae78080..000000000
--- a/app/mobile-war/src/main/java/com/silverpeas/mobile/shared/services/ServiceContactAsync.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package com.silverpeas.mobile.shared.services;
-
-import java.util.List;
-
-import com.google.gwt.user.client.rpc.AsyncCallback;
-import com.silverpeas.mobile.shared.dto.DetailUserDTO;
-
-public interface ServiceContactAsync {
-  void getContacts(String filter, int pageSize, int startIndex, final AsyncCallback<List<DetailUserDTO>> async);
-}
diff --git a/app/mobile-war/src/main/java/com/silverpeas/mobile/shared/services/ServiceDashboardAsync.java b/app/mobile-war/src/main/java/com/silverpeas/mobile/shared/services/ServiceDashboardAsync.java
deleted file mode 100644
index 67a67406b..000000000
--- a/app/mobile-war/src/main/java/com/silverpeas/mobile/shared/services/ServiceDashboardAsync.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package com.silverpeas.mobile.shared.services;
-
-import java.util.List;
-
-import com.google.gwt.user.client.rpc.AsyncCallback;
-import com.silverpeas.mobile.shared.dto.SocialInformationDTO;
-
-public interface ServiceDashboardAsync {
-	void getAll(int reinitialisationPage, String socialInformationType, AsyncCallback <List<SocialInformationDTO>> callback);
-}
diff --git a/app/mobile-war/src/main/java/com/silverpeas/mobile/shared/services/ServiceDocumentsAsync.java b/app/mobile-war/src/main/java/com/silverpeas/mobile/shared/services/ServiceDocumentsAsync.java
deleted file mode 100644
index 5c085379c..000000000
--- a/app/mobile-war/src/main/java/com/silverpeas/mobile/shared/services/ServiceDocumentsAsync.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package com.silverpeas.mobile.shared.services;
-
-import java.util.List;
-
-import com.google.gwt.user.client.rpc.AsyncCallback;
-import com.silverpeas.mobile.shared.dto.BaseDTO;
-import com.silverpeas.mobile.shared.dto.documents.TopicDTO;
-import com.silverpeas.mobile.shared.dto.documents.AttachmentDTO;
-import com.silverpeas.mobile.shared.dto.documents.PublicationDTO;
-
-public interface ServiceDocumentsAsync {
-
-  void getTopics(String instanceId, String rootTopicId, AsyncCallback<List<TopicDTO>> callback);
-
-  void getPublications(String instanceId, String topicId, 	AsyncCallback<List<PublicationDTO>> callback);
-
-  void getPublication(String pubId, AsyncCallback<PublicationDTO> callback);
-
-  void getTopicsAndPublications(String instanceId, String rootTopicId, AsyncCallback<List<BaseDTO>> callback);
-
-  void getAttachment(String appId, String attachmentId, final AsyncCallback<AttachmentDTO> async);
-
-
-}
diff --git a/app/mobile-war/src/main/java/com/silverpeas/mobile/shared/services/ServiceMediaAsync.java b/app/mobile-war/src/main/java/com/silverpeas/mobile/shared/services/ServiceMediaAsync.java
deleted file mode 100644
index 3c892d616..000000000
--- a/app/mobile-war/src/main/java/com/silverpeas/mobile/shared/services/ServiceMediaAsync.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package com.silverpeas.mobile.shared.services;
-
-import java.util.List;
-
-import com.google.gwt.user.client.rpc.AsyncCallback;
-import com.silverpeas.mobile.shared.dto.BaseDTO;
-import com.silverpeas.mobile.shared.dto.media.PhotoDTO;
-import com.silverpeas.mobile.shared.dto.media.SoundDTO;
-import com.silverpeas.mobile.shared.dto.media.VideoDTO;
-import com.silverpeas.mobile.shared.dto.media.VideoStreamingDTO;
-import com.silverpeas.mobile.shared.dto.navigation.ApplicationInstanceDTO;
-
-public interface ServiceMediaAsync {
-
-	void uploadPicture(String name, String data, String idGallery, String idAlbum, AsyncCallback<Void> callback);
-
-	void getAllGalleries(AsyncCallback<List<ApplicationInstanceDTO>> callback);
-
-	void getOriginalPicture(String instanceId, String pictureId, AsyncCallback<PhotoDTO> callback);
-
-	void getPreviewPicture(String instanceId, String pictureId, AsyncCallback<PhotoDTO> callback);
-
-  void getAlbumsAndPictures(String instanceId, String albumId,
-      final AsyncCallback<List<BaseDTO>> async);
-
-  void getSound(String instanceId, String soundId, final AsyncCallback<SoundDTO> async);
-
-  void getVideo(String instanceId, String videoId, final AsyncCallback<VideoDTO> async);
-
-  void getVideoStreaming(final String instanceId, final String videoId,
-      final AsyncCallback<VideoStreamingDTO> async);
-}
diff --git a/app/mobile-war/src/main/java/com/silverpeas/mobile/shared/services/ServiceNewsAsync.java b/app/mobile-war/src/main/java/com/silverpeas/mobile/shared/services/ServiceNewsAsync.java
deleted file mode 100644
index ab648fd4f..000000000
--- a/app/mobile-war/src/main/java/com/silverpeas/mobile/shared/services/ServiceNewsAsync.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package com.silverpeas.mobile.shared.services;
-
-import com.google.gwt.user.client.rpc.AsyncCallback;
-import com.silverpeas.mobile.shared.dto.news.NewsDTO;
-
-import java.util.List;
-
-public interface ServiceNewsAsync {
-  void loadNews(final AsyncCallback<List<NewsDTO>> async);
-}
diff --git a/app/mobile-war/src/main/java/com/silverpeas/mobile/shared/services/ServiceNotificationsAsync.java b/app/mobile-war/src/main/java/com/silverpeas/mobile/shared/services/ServiceNotificationsAsync.java
deleted file mode 100644
index 066428083..000000000
--- a/app/mobile-war/src/main/java/com/silverpeas/mobile/shared/services/ServiceNotificationsAsync.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package com.silverpeas.mobile.shared.services;
-
-import com.google.gwt.user.client.rpc.AsyncCallback;
-import com.silverpeas.mobile.shared.dto.BaseDTO;
-import com.silverpeas.mobile.shared.dto.notifications.NotificationDTO;
-
-import java.util.List;
-
-public interface ServiceNotificationsAsync {
-
-    void send(NotificationDTO notification, List<BaseDTO> receivers, String subject, AsyncCallback<Void> async);
-
-    void getAllowedUsersAndGroups(String componentId, String contentId, AsyncCallback<List<BaseDTO>> async);
-}
diff --git a/app/mobile-war/src/main/java/com/silverpeas/mobile/shared/services/ServiceRSEAsync.java b/app/mobile-war/src/main/java/com/silverpeas/mobile/shared/services/ServiceRSEAsync.java
deleted file mode 100644
index d3c6066fb..000000000
--- a/app/mobile-war/src/main/java/com/silverpeas/mobile/shared/services/ServiceRSEAsync.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package com.silverpeas.mobile.shared.services;
-
-import java.util.List;
-
-import com.google.gwt.user.client.rpc.AsyncCallback;
-import com.silverpeas.mobile.shared.dto.StatusDTO;
-
-public interface ServiceRSEAsync {
-	void updateStatus(String status, AsyncCallback<String> callback);
-	void getStatus(int step, AsyncCallback<List<StatusDTO>> callback);
-
-  void getStatus(final AsyncCallback<StatusDTO> async);
-}
diff --git a/app/mobile-war/src/main/java/com/silverpeas/mobile/shared/services/ServiceSearchAsync.java b/app/mobile-war/src/main/java/com/silverpeas/mobile/shared/services/ServiceSearchAsync.java
deleted file mode 100644
index b5c6b61fe..000000000
--- a/app/mobile-war/src/main/java/com/silverpeas/mobile/shared/services/ServiceSearchAsync.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package com.silverpeas.mobile.shared.services;
-
-import com.google.gwt.user.client.rpc.AsyncCallback;
-import com.silverpeas.mobile.shared.dto.search.ResultDTO;
-
-import java.util.List;
-
-public interface ServiceSearchAsync {
-  void search(String query, AsyncCallback<List<ResultDTO>> callback);
-}
diff --git a/app/mobile-war/src/main/java/com/silverpeas/mobile/shared/services/ServiceTasksAsync.java b/app/mobile-war/src/main/java/com/silverpeas/mobile/shared/services/ServiceTasksAsync.java
deleted file mode 100644
index c6d804c72..000000000
--- a/app/mobile-war/src/main/java/com/silverpeas/mobile/shared/services/ServiceTasksAsync.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package com.silverpeas.mobile.shared.services;
-
-import com.google.gwt.user.client.rpc.AsyncCallback;
-import com.silverpeas.mobile.shared.dto.TaskDTO;
-
-import java.util.List;
-
-public interface ServiceTasksAsync {
-  void loadTasks(final AsyncCallback<List<TaskDTO>> async);
-
-  void updateTask(TaskDTO task, final AsyncCallback<Void> async);
-
-  void createTask(final TaskDTO task, final AsyncCallback<TaskDTO> async);
-}
diff --git a/app/mobile-war/src/main/java/com/silverpeas/mobile/shared/services/navigation/ServiceNavigationAsync.java b/app/mobile-war/src/main/java/com/silverpeas/mobile/shared/services/navigation/ServiceNavigationAsync.java
deleted file mode 100644
index 72213c899..000000000
--- a/app/mobile-war/src/main/java/com/silverpeas/mobile/shared/services/navigation/ServiceNavigationAsync.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package com.silverpeas.mobile.shared.services.navigation;
-
-import java.util.List;
-
-import com.google.gwt.user.client.rpc.AsyncCallback;
-import com.silverpeas.mobile.shared.dto.navigation.ApplicationInstanceDTO;
-import com.silverpeas.mobile.shared.dto.navigation.SilverpeasObjectDTO;
-
-public interface ServiceNavigationAsync {
-	void getSpacesAndApps(String rootSpaceId, String appType, AsyncCallback<List<SilverpeasObjectDTO>> callback);
-
-  void getApp(String instanceId, final AsyncCallback<ApplicationInstanceDTO> async);
-}