Enable the table selector in the DetailsView.
[online-glom:gwt-glom.git] / src / main / java / org / glom / web / client / OnlineGlomServiceAsync.java
1 /*
2  * Copyright (C) 2011 Openismus GmbH
3  *
4  * This file is part of GWT-Glom.
5  *
6  * GWT-Glom is free software: you can redistribute it and/or modify it
7  * under the terms of the GNU Lesser General Public License as published by the
8  * Free Software Foundation, either version 3 of the License, or (at your
9  * option) any later version.
10  *
11  * GWT-Glom is distributed in the hope that it will be useful, but WITHOUT
12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
14  * for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public License
17  * along with GWT-Glom.  If not, see <http://www.gnu.org/licenses/>.
18  */
19
20 package org.glom.web.client;
21
22 import java.util.ArrayList;
23
24 import org.glom.web.shared.Documents;
25 import org.glom.web.shared.GlomDocument;
26 import org.glom.web.shared.GlomField;
27 import org.glom.web.shared.layout.LayoutGroup;
28
29 import com.google.gwt.core.client.GWT;
30 import com.google.gwt.user.client.rpc.AsyncCallback;
31
32 public interface OnlineGlomServiceAsync {
33
34         /**
35          * Utility class to get the RPC Async interface from client-side code
36          */
37         public static final class Util {
38                 private static OnlineGlomServiceAsync instance;
39
40                 public static final OnlineGlomServiceAsync getInstance() {
41                         if (instance == null) {
42                                 instance = (OnlineGlomServiceAsync) GWT.create(OnlineGlomService.class);
43                         }
44                         return instance;
45                 }
46
47                 private Util() {
48                         // Utility class should not be instantiated
49                 }
50         }
51
52         void getGlomDocument(String documentID, AsyncCallback<GlomDocument> callback);
53
54         void getListLayout(String documentID, String tableName, AsyncCallback<LayoutGroup> callback);
55
56         void getListData(String documentID, String tableName, int start, int length,
57                         AsyncCallback<ArrayList<GlomField[]>> callback);
58
59         void getSortedListData(String documentID, String tableName, int start, int length, int columnIndex,
60                         boolean isAscending, AsyncCallback<ArrayList<GlomField[]>> callback);
61
62         void getDocuments(AsyncCallback<Documents> callback);
63
64         void isAuthenticated(String documentID, AsyncCallback<Boolean> callback);
65
66         void checkAuthentication(String documentID, String username, String password, AsyncCallback<Boolean> callback);
67
68         void getDefaultListLayout(String documentID, AsyncCallback<LayoutGroup> callback);
69
70         void getDetailsLayout(String documentID, String tableName, AsyncCallback<ArrayList<LayoutGroup>> callback);
71
72         void getDetailsData(String documentID, String tableName, String primaryKeyValue, AsyncCallback<GlomField[]> callback);
73
74 }