Reports: Use quickFind.
[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.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;
32
33 import com.google.gwt.core.client.GWT;
34 import com.google.gwt.user.client.rpc.AsyncCallback;
35
36 public interface OnlineGlomServiceAsync {
37
38         /**
39          * Utility class to get the RPC Async interface from client-side code
40          */
41         public static final class Util {
42                 private static OnlineGlomServiceAsync instance;
43
44                 public static final OnlineGlomServiceAsync getInstance() {
45                         if (instance == null) {
46                                 instance = (OnlineGlomServiceAsync) GWT.create(OnlineGlomService.class);
47                         }
48                         return instance;
49                 }
50
51                 private Util() {
52                         // Utility class should not be instantiated
53                 }
54         }
55
56         void getDocumentInfo(String documentID, String localeID, AsyncCallback<DocumentInfo> callback);
57
58         void getListViewLayout(String documentID, String tableName, final String localeID,
59                         AsyncCallback<LayoutGroup> callback);
60
61         void getReportHTML(String documentID, String tableName, String reportName, String quickFind, String localeID,
62                         AsyncCallback<String> callback);
63
64         void getListViewData(String documentID, String tableName, String quickFind, int start, int length,
65                         AsyncCallback<ArrayList<DataItem[]>> callback);
66
67         void getSortedListViewData(String documentID, String tableName, String quickFind, int start, int length,
68                         int sortColumnIndex, boolean isAscending, AsyncCallback<ArrayList<DataItem[]>> callback);
69
70         void getDocuments(AsyncCallback<Documents> callback);
71
72         void isAuthenticated(String documentID, AsyncCallback<Boolean> callback);
73
74         void checkAuthentication(String documentID, String username, String password, AsyncCallback<Boolean> callback);
75
76         void getReportsList(String documentID, String tableName, String localeID, AsyncCallback<Reports> callback);
77
78         void getDetailsLayoutAndData(String documentID, String tableName, TypedDataItem primaryKeyValue, String localeID,
79                         AsyncCallback<DetailsLayoutAndData> callback);
80
81         void getDetailsData(String documentID, String tableName, TypedDataItem primaryKeyValue,
82                         AsyncCallback<DataItem[]> callback);
83
84         void getRelatedListData(String documentID, String tableName, String relationshipName,
85                         TypedDataItem foreignKeyValue, int start, int length, AsyncCallback<ArrayList<DataItem[]>> callback);
86
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);
90
91         void getRelatedListRowCount(String documentID, String tableName, String relationshipName,
92                         TypedDataItem foreignKeyValue, AsyncCallback<Integer> callback);
93
94         void getSuitableRecordToViewDetails(String documentID, String tableName, String relationshipName,
95                         TypedDataItem primaryKeyValue, AsyncCallback<NavigationRecord> callback);
96
97         void getConfigurationErrorMessage(AsyncCallback<String> callback);
98 }