KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > raptus > owxv3 > modules > base > EABaseListBean


1 /*
2  * eAdmin/OWX
3  * Copyright (C) 1996-2003 OWX-Project Team <owx-team@gmx.net>
4  */

5
6 package com.raptus.owxv3.modules.base;
7
8 import java.util.*;
9
10 import javax.servlet.http.HttpServletRequest JavaDoc;
11
12 import org.apache.struts.action.ActionMapping;
13
14 import com.raptus.owxv3.api.*;
15
16 /**
17  *
18  * <hr>
19  * <table width="100%" border="0">
20  * <tr>
21  * <td width="24%"><b>Filename</b></td><td width="76%">EABaseListBean.java</td>
22  * </tr>
23  * <tr>
24  * <td width="24%"><b>Author</b></td><td width="76%">Guy Zürcher (gzuercher@raptus.com)</td>
25  * </tr>
26  * <tr>
27  * <td width="24%"><b>Date</b></td><td width="76%">2nd of May 2001</td>
28  * </tr>
29  * </table>
30  * <hr>
31  * <table width="100%" border="0">
32  * <tr>
33  * <td width="24%"><b>Date / Author</b></td><td width="76%"><b>Changes</b></td>
34  * </tr>
35  * </table>
36  * <hr>
37  */

38 public class EABaseListBean extends OmniaWebBean
39 {
40     /**
41      *
42      */

43     protected Vector nwsList = null;
44
45
46     /**
47      *
48      */

49     protected boolean picturesEnabled=false;
50
51
52     /**
53      *
54      */

55     protected boolean filesEnabled=false;
56
57     /**
58      *
59      */

60     protected boolean linksEnabled=false;
61
62
63     /**
64      *
65      */

66     protected boolean categoriesEnabled=false;
67
68     /**
69      *
70      */

71     protected boolean isListLoaded() { return nwsList != null; }
72
73     /**
74      *
75      */

76     public Vector getList() { return nwsList; }
77     public void setList(Vector l) { this.nwsList = l; }
78
79
80
81     /**
82      *
83      */

84     public boolean getFilesEnabled() { return filesEnabled; }
85     public void setFilesEnabled(boolean b) { filesEnabled =b ; }
86
87
88     /**
89      *
90      */

91     public boolean getPicturesEnabled() { return picturesEnabled; }
92     public void setPicturesEnabled(boolean b) { picturesEnabled =b ; }
93
94
95     /**
96      *
97      */

98     public boolean getLinksEnabled() { return linksEnabled; }
99     public void setLinksEnabled(boolean b) { linksEnabled =b ; }
100
101     /**
102      *
103      */

104     public boolean getCategoriesEnabled() { return categoriesEnabled; }
105     public void setCategoriesEnabled(boolean b) { categoriesEnabled =b ; }
106
107
108
109     /**
110      *
111      */

112     public void reset(ActionMapping mapping, HttpServletRequest JavaDoc request)
113     {
114         super.reset(mapping, request);
115     }
116
117     /**
118      *
119      */

120     public EABaseListEntry getEntry(int id)
121     {
122         Enumeration enuEntries = nwsList.elements();
123         while(enuEntries.hasMoreElements())
124         {
125             EABaseListEntry eae = (EABaseListEntry) enuEntries.nextElement();
126             if(eae != null && eae.getRowId() == id)
127                 return eae;
128         }
129
130         return null;
131     }
132
133     /**
134      *A category selector used to prefill the parent select box
135      */

136     protected CategorySelector categorySelector=null;
137
138     /**
139      *Setter method of Category Selector
140      */

141     public void setCategorySelector(CategorySelector catsel)
142     {
143         categorySelector=catsel;
144     }
145
146     /**
147      *Getter method of Category Selector
148      */

149     public CategorySelector getCategorySelector()
150     {
151         return categorySelector;
152     }
153
154     protected int Selcategory=0;
155     public void setCategory(int id)
156     {
157         Selcategory = id;
158     }
159
160     public int getCategory()
161     {
162         return Selcategory;
163     }
164 }
165
166 // eof
167
Popular Tags