Enable the CellTable Pager when more than 20 rows need to be viewed.
[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 import org.glom.web.shared.LayoutListTable;
7
8 import com.google.gwt.core.client.GWT;
9 import com.google.gwt.user.client.rpc.AsyncCallback;
10
11 public interface OnlineGlomServiceAsync {
12
13         void getGlomDocument(AsyncCallback<GlomDocument> callback);
14
15         void getLayoutListTable(String tableName, AsyncCallback<LayoutListTable> callback);
16
17         void getTableData(int start, int length, String table, AsyncCallback<ArrayList<String[]>> callback);
18
19         /**
20          * Utility class to get the RPC Async interface from client-side code
21          */
22         public static final class Util {
23                 private static OnlineGlomServiceAsync instance;
24
25                 public static final OnlineGlomServiceAsync getInstance() {
26                         if (instance == null) {
27                                 instance = (OnlineGlomServiceAsync) GWT.create(OnlineGlomService.class);
28                         }
29                         return instance;
30                 }
31
32                 private Util() {
33                         // Utility class should not be instanciated
34                 }
35         }
36 }