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.DataItem;
25 import org.glom.web.shared.DetailsLayoutAndData;
26 import org.glom.web.shared.DocumentInfo;
27 import org.glom.web.shared.Documents;
28 import org.glom.web.shared.NavigationRecord;
29 import org.glom.web.shared.Reports;
30 import org.glom.web.shared.TypedDataItem;
31 import org.glom.web.shared.layout.LayoutGroup;
33 import com.google.gwt.core.client.GWT;
34 import com.google.gwt.user.client.rpc.AsyncCallback;
36 public interface OnlineGlomServiceAsync {
39 * Utility class to get the RPC Async interface from client-side code
41 public static final class Util {
42 private static OnlineGlomServiceAsync instance;
44 public static final OnlineGlomServiceAsync getInstance() {
45 if (instance == null) {
46 instance = (OnlineGlomServiceAsync) GWT.create(OnlineGlomService.class);
52 // Utility class should not be instantiated
56 void getDocumentInfo(String documentID, String localeID, AsyncCallback<DocumentInfo> callback);
58 void getListViewLayout(String documentID, String tableName, final String localeID,
59 AsyncCallback<LayoutGroup> callback);
61 void getReportHTML(String documentID, String tableName, String reportName, String quickFind, String localeID,
62 AsyncCallback<String> callback);
64 void getListViewData(String documentID, String tableName, String quickFind, int start, int length,
65 AsyncCallback<ArrayList<DataItem[]>> callback);
67 void getSortedListViewData(String documentID, String tableName, String quickFind, int start, int length,
68 int sortColumnIndex, boolean isAscending, AsyncCallback<ArrayList<DataItem[]>> callback);
70 void getDocuments(AsyncCallback<Documents> callback);
72 void isAuthenticated(String documentID, AsyncCallback<Boolean> callback);
74 void checkAuthentication(String documentID, String username, String password, AsyncCallback<Boolean> callback);
76 void getReportsList(String documentID, String tableName, String localeID, AsyncCallback<Reports> callback);
78 void getDetailsLayoutAndData(String documentID, String tableName, TypedDataItem primaryKeyValue, String localeID,
79 AsyncCallback<DetailsLayoutAndData> callback);
81 void getDetailsData(String documentID, String tableName, TypedDataItem primaryKeyValue,
82 AsyncCallback<DataItem[]> callback);
84 void getRelatedListData(String documentID, String tableName, String relationshipName,
85 TypedDataItem foreignKeyValue, int start, int length, AsyncCallback<ArrayList<DataItem[]>> callback);
87 void getSortedRelatedListData(String documentID, String tableName, String relationshipName,
88 TypedDataItem foreignKeyValue, int start, int length, int sortColumnIndex, boolean ascending,
89 AsyncCallback<ArrayList<DataItem[]>> callback);
91 void getRelatedListRowCount(String documentID, String tableName, String relationshipName,
92 TypedDataItem foreignKeyValue, AsyncCallback<Integer> callback);
94 void getSuitableRecordToViewDetails(String documentID, String tableName, String relationshipName,
95 TypedDataItem primaryKeyValue, AsyncCallback<NavigationRecord> callback);
97 void getConfigurationErrorMessage(AsyncCallback<String> callback);