Rename RPC service classes from LibGlomService* to OnlineGlomService*.
[online-glom:gwt-glom.git] / src / main / java / org / glom / web / client / OnlineGlomServiceAsync.java
1 package org.glom.web.client;
2
3 import java.util.ArrayList;
4
5 import org.glom.web.shared.GlomDocument;
6
7 import com.google.gwt.core.client.GWT;
8 import com.google.gwt.user.client.rpc.AsyncCallback;
9
10 public interface OnlineGlomServiceAsync {
11
12         void getGlomDocument(AsyncCallback<GlomDocument> callback);
13
14         void getLayoutListHeaders(String table, AsyncCallback<String[]> callback);
15
16         void getTableData(int start, int length, String table, AsyncCallback<ArrayList<String[]>> callback);
17
18         /**
19          * Utility class to get the RPC Async interface from client-side code
20          */
21         public static final class Util {
22                 private static OnlineGlomServiceAsync instance;
23
24                 public static final OnlineGlomServiceAsync getInstance() {
25                         if (instance == null) {
26                                 instance = (OnlineGlomServiceAsync) GWT.create(OnlineGlomService.class);
27                         }
28                         return instance;
29                 }
30
31                 private Util() {
32                         // Utility class should not be instanciated
33                 }
34         }
35 }