View Javadoc

1   /***
2    * Copyright (c) 2003 held jointly by the individual authors.            
3    *                                                                          
4    * This library is free software; you can redistribute it and/or modify it    
5    * under the terms of the GNU Lesser General Public License as published      
6    * by the Free Software Foundation; either version 2.1 of the License, or 
7    * (at your option) any later version.                                            
8    *                                                                            
9    * This library is distributed in the hope that it will be useful, but 
10   * WITHOUT ANY WARRANTY; with out even the implied warranty of 
11   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
12   * GNU Lesser General Public License for more details.                                                  
13   *                                                                           
14   * You should have received a copy of the GNU Lesser General Public License   
15   * along with this library;  if not, write to the Free Software Foundation,   
16   * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA.              
17   *                                                                            
18   * > http://www.gnu.org/copyleft/lesser.html                                  
19   * > http://www.opensource.org/licenses/lgpl-license.php
20   */
21  package net.mlw.vlh;
22  
23  /*** This class abstracts the means by which a 
24   *  ValueList is retrieved by the service.
25   * 
26   * @author Matthew L. Wilson, Andrej Zachar
27   * @version $Revision: 1.5 $ $Date: 2005/04/07 14:07:40 $
28   */
29  public interface ValueListAdapter
30  {
31     /*** Constant to tell the Handler to do nothing. */
32     static final int DO_NOTHING = 0;
33     /*** Constant to tell the Handler to do sorting. */
34     static final int DO_SORT = 1;
35     /*** Constant to tell the Handler to do paging.  */
36     static final int DO_PAGE = 2;
37     /*** Constant to tell the Handler to do filtering.  */
38     static final int DO_FILTER = 4;
39     /*** Constant to tell the Handler to do focusing. */
40     static final int DO_FOCUS = 8;
41  
42     /*** Gets a ValueList
43      * @param info The <CODE>ValueList</CODE> information
44      * @param name The name of the <CODE>ValueList</CODE>
45      * 
46      * @return The <CODE>ValueList</CODE>
47      */
48     ValueList getValueList(String name, ValueListInfo info);
49  
50     /*** This method tells the Service what still needs to be done on the
51      *  Collection before returning the data.
52      *
53      * @return A bitwise or combination of DO_NOTHING,
54      *         DO_SORT, DO_PAGE and DO_FILTER.  For example:<br>
55      *         <pre>
56      *           public int getAdapterType()
57      *           {
58      *             return DO_SORT | DO_PAGE;
59      *           }
60      *         </pre>  
61      */
62     int getAdapterType();
63  }