KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > opencms > workplace > list > CmsListState


1 /*
2  * File : $Source: /usr/local/cvs/opencms/src/org/opencms/workplace/list/CmsListState.java,v $
3  * Date : $Date: 2006/03/27 14:52:27 $
4  * Version: $Revision: 1.7 $
5  *
6  * This library is part of OpenCms -
7  * the Open Source Content Mananagement System
8  *
9  * Copyright (c) 2005 Alkacon Software GmbH (http://www.alkacon.com)
10  *
11  * This library is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU Lesser General Public
13  * License as published by the Free Software Foundation; either
14  * version 2.1 of the License, or (at your option) any later version.
15  *
16  * This library is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19  * Lesser General Public License for more details.
20  *
21  * For further information about Alkacon Software GmbH, please see the
22  * company website: http://www.alkacon.com
23  *
24  * For further information about OpenCms, please see the
25  * project website: http://www.opencms.org
26  *
27  * You should have received a copy of the GNU Lesser General Public
28  * License along with this library; if not, write to the Free Software
29  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
30  */

31
32 package org.opencms.workplace.list;
33
34 /**
35  * Class for storing the state of a list.<p>
36  *
37  * A list state includes:<br>
38  * <ul>
39  * <li>The current sorted Column</li>
40  * <li>The sorted column Order</li>
41  * <li>The current displayed Page</li>
42  * <li>The current search Filter</li>
43  * </ul>
44  * <p>
45  *
46  * @author Michael Moossen
47  *
48  * @version $Revision: 1.7 $
49  *
50  * @since 6.0.0
51  */

52 public class CmsListState {
53
54     /** Current sorted column. */
55     private final String JavaDoc m_column;
56     /** Current search filter. */
57     private final String JavaDoc m_filter;
58     /** Current sort order. */
59     private final CmsListOrderEnum m_order;
60     /** Current visible page. */
61     private final int m_page;
62
63     /**
64      * Default Constructor.<p>
65      *
66      * @param list the list to read the state from
67      */

68     public CmsListState(CmsHtmlList list) {
69
70         m_column = list.getSortedColumn();
71         m_filter = list.getSearchFilter();
72         m_page = list.getCurrentPage();
73         m_order = list.getCurrentSortOrder();
74     }
75
76     /**
77      * Returns the column.<p>
78      *
79      * @return the column
80      */

81     public String JavaDoc getColumn() {
82
83         return m_column;
84     }
85
86     /**
87      * Returns the filter.<p>
88      *
89      * @return the filter
90      */

91     public String JavaDoc getFilter() {
92
93         return m_filter;
94     }
95
96     /**
97      * Returns the order.<p>
98      *
99      * @return the order
100      */

101     public CmsListOrderEnum getOrder() {
102
103         return m_order;
104     }
105
106     /**
107      * Returns the page.<p>
108      *
109      * @return the page
110      */

111     public int getPage() {
112
113         return m_page;
114     }
115
116 }
117
Popular Tags