2 * Copyright (C) 2011 Openismus GmbH
4 * This file is part of GWT-Glom.
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.
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
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/>.
20 package org.glom.web.client;
22 import java.util.ArrayList;
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;
29 import com.google.gwt.core.client.GWT;
30 import com.google.gwt.user.client.rpc.AsyncCallback;
32 public interface OnlineGlomServiceAsync {
35 * Utility class to get the RPC Async interface from client-side code
37 public static final class Util {
38 private static OnlineGlomServiceAsync instance;
40 public static final OnlineGlomServiceAsync getInstance() {
41 if (instance == null) {
42 instance = (OnlineGlomServiceAsync) GWT.create(OnlineGlomService.class);
48 // Utility class should not be instantiated
52 void getGlomDocument(String documentID, AsyncCallback<GlomDocument> callback);
54 void getListLayout(String documentID, String tableName, AsyncCallback<LayoutGroup> callback);
56 void getListData(String documentID, String tableName, int start, int length,
57 AsyncCallback<ArrayList<GlomField[]>> callback);
59 void getSortedListData(String documentID, String tableName, int start, int length, int columnIndex,
60 boolean isAscending, AsyncCallback<ArrayList<GlomField[]>> callback);
62 void getDocuments(AsyncCallback<Documents> callback);
64 void isAuthenticated(String documentID, AsyncCallback<Boolean> callback);
66 void checkAuthentication(String documentID, String username, String password, AsyncCallback<Boolean> callback);
68 void getDefaultListLayout(String documentID, AsyncCallback<LayoutGroup> callback);
70 void getDetailsLayout(String documentID, String tableName, AsyncCallback<ArrayList<LayoutGroup>> callback);
72 void getDetailsData(String documentID, String tableName, String primaryKeyValue, AsyncCallback<GlomField[]> callback);