KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > opensubsystems > patterns > listdata > logic > ListController


1 /*
2  * Copyright (c) 2003 - 2007 OpenSubsystems s.r.o. Slovak Republic. All rights reserved.
3  *
4  * Project: OpenSubsystems
5  *
6  * $Id: ListController.java,v 1.9 2007/01/07 06:15:35 bastafidli Exp $
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; version 2 of the License.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20  */

21
22 package org.opensubsystems.patterns.listdata.logic;
23
24 import java.rmi.RemoteException JavaDoc;
25 import java.util.List JavaDoc;
26
27 import org.opensubsystems.core.error.OSSException;
28 import org.opensubsystems.core.logic.StatelessController;
29 import org.opensubsystems.patterns.listdata.data.ListOptions;
30
31 /**
32  * This interface define business logic related to retrieving list of data objects
33  * from the persistence store.
34  *
35  * @version $Id: ListController.java,v 1.9 2007/01/07 06:15:35 bastafidli Exp $
36  * @author Julo Legeny
37  * @code.reviewer Miro Halas
38  * @code.reviewed 1.7 2005/09/27 01:35:34 jlegeny
39  */

40 public interface ListController extends StatelessController
41 {
42    /**
43     * Get default list, which is the list to show when the list is displayed
44     * the first time. No parameters have to be initialized for this action
45     *
46     * @param options - list options
47     * @return Object[] - index 0 - updated list options
48     * - index 1 - list of DataObjects
49     * - index 2 - object tatatype
50     * @throws OSSException - an error has occured
51     * @throws RemoteException - required since this method can be called remotely
52     */

53    Object JavaDoc[] getShowList(
54       ListOptions options
55    ) throws OSSException,
56             RemoteException JavaDoc;
57
58    /**
59     * Get list after list definition has changed..
60     * These parameters have to be initialized for this action
61     * - definitionId
62     *
63     * @param options - list options
64     * @return Object[] - index 0 - updated list options
65     * - index 1 - list of DataObjects
66     * - index 2 - object tatatype
67     * @throws OSSException - an error has occured
68     * @throws RemoteException - required since this method can be called remotely
69     */

70    Object JavaDoc[] getSetDefinition(
71       ListOptions options
72    ) throws OSSException,
73             RemoteException JavaDoc;
74
75    /**
76     * Get list after order column changed.
77     * These parameters have to be initialized for this action
78     * - definitionId
79     * - orderDirection
80     * - orderCode
81     * - pageSize
82     *
83     * These parameters are considered if they are initialized
84     * - selectedItems
85     *
86     * @param options - list options
87     * @return Object[] - index 0 - updated list options
88     * - index 1 - list of DataObjects
89     * - index 2 - object tatatype
90     * @throws OSSException - an error has occured
91     * @throws RemoteException - required since this method can be called remotely
92     */

93    Object JavaDoc[] getSetOrder(
94       ListOptions options
95    ) throws OSSException,
96             RemoteException JavaDoc;
97
98    /**
99     * Get list after page size changed.
100     * These parameters have to be initialized for this action
101     * - definitionId
102     * - orderDirection
103     * - orderCode
104     * - beginPosition
105     * - pageSize
106     *
107     * These parameters are considered if there are initialized
108     * - clientorderDirection
109     * - clientOrderCode
110     * - firstVisibleItem
111     * - selectedItems
112     *
113     * @param options - list options
114     * @return Object[] - index 0 - updated list options
115     * - index 1 - list of DataObjects
116     * - index 2 - object tatatype
117     * @throws OSSException - an error has occured
118     * @throws RemoteException - required since this method can be called remotely
119     */

120    Object JavaDoc[] getSetPageSize(
121       ListOptions options
122    ) throws OSSException,
123             RemoteException JavaDoc;
124
125    /**
126     * Get list for previous page.
127     * These parameters have to be initialized for this action
128     * - definitionId
129     * - orderDirection
130     * - orderCode
131     * - beginPosition
132     * - pageSize
133     *
134     * These parameters are considered if there are initialized
135     * - clientorderDirection
136     * - clientOrderCode
137     * - firstVisibleItem
138     * - selectedItems
139     *
140     * @param options - list options
141     * @return Object[] - index 0 - updated list options
142     * - index 1 - list of DataObjects
143     * - index 2 - object tatatype
144     * @throws OSSException - an error has occured
145     * @throws RemoteException - required since this method can be called remotely
146     */

147    Object JavaDoc[] getPreviousPage(
148       ListOptions options
149    ) throws OSSException,
150             RemoteException JavaDoc;
151
152    /**
153     * Get list for next page.
154     * These parameters have to be initialized for this action
155     * - definitionId
156     * - orderDirection
157     * - orderCode
158     * - endPosition
159     * - pageSize
160     *
161     * These parameters are considered if there are initialized
162     * - clientorderDirection
163     * - clientOrderCode
164     * - firstVisibleItem
165     * - selectedItems
166     *
167     * @param options - list options
168     * @return Object[] - index 0 - updated list options
169     * - index 1 - list of DataObjects
170     * - index 2 - object tatatype
171     * @throws OSSException - an error has occured
172     * @throws RemoteException - required since this method can be called remotely
173     */

174    Object JavaDoc[] getNextPage(
175       ListOptions options
176    ) throws OSSException,
177             RemoteException JavaDoc;
178
179    /**
180     * Get list for some specific page.
181     * These parameters have to be initialized for this action
182     * - definitionId
183     * - actualPage
184     * - orderDirection
185     * - orderCode
186     * - pageSize
187     *
188     * These parameters are considered if there are initialized
189     * - clientorderDirection
190     * - clientOrderCode
191     * - firstVisibleItem
192     * - selectedItems
193     *
194     * @param options - list options
195     * @return Object[] - index 0 - updated list options
196     * - index 1 - list of DataObjects
197     * - index 2 - object tatatype
198     * @throws OSSException - an error has occured
199     * @throws RemoteException - required since this method can be called remotely
200     */

201    Object JavaDoc[] getExactPage(
202       ListOptions options
203    ) throws OSSException,
204             RemoteException JavaDoc;
205    
206    /**
207     * Get definition list (list of generic data)
208     *
209     * @param iDataType - datatype of the object
210     * @return List - definition list (list of generic data)
211     * @throws OSSException - an error has occured
212     * @throws RemoteException - required since this method can be called remotely
213     */

214    List JavaDoc getDefinitionList(
215       int iDataType
216    ) throws OSSException,
217             RemoteException JavaDoc;
218 }
219
Popular Tags