KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > nemesis > forum > webapp > admin > bean > ForumBean


1 package org.nemesis.forum.webapp.admin.bean;
2
3 import java.util.HashMap JavaDoc;
4 import java.util.Iterator JavaDoc;
5 import java.util.Map JavaDoc;
6
7 import org.nemesis.forum.config.ConfigLoader;
8
9 /**
10  * @author dlaurent
11  *
12  * 21 févr. 2003
13  */

14 public class ForumBean {
15         
16     int id ;
17     String JavaDoc name ;
18     String JavaDoc description ;
19     int threads;
20     int messages;
21     
22     int moderationType;
23     
24     int approvedThreads;
25     int approvedMessages;
26     
27     int notApprovedThreads;
28     int notApprovedMessages;
29     
30     boolean admin=false;
31
32
33
34     
35     Map JavaDoc properties=new HashMap JavaDoc();
36     
37     /**
38      *
39      */

40     public ForumBean() {
41         //load extended properties
42
String JavaDoc temp=null;
43         for(Iterator JavaDoc it= ConfigLoader.getInstance().getConfig().getForumExtendedProperties().iterator();it.hasNext();){
44             properties.put((String JavaDoc)it.next(),"");
45         }
46         
47     }
48
49     public void setPropertie(String JavaDoc key, String JavaDoc value) {
50         properties.put(key, value);
51     }
52
53     public String JavaDoc getPropertie(String JavaDoc key) {
54         return (String JavaDoc)properties.get(key);
55     }
56     
57     
58
59     
60     /**
61      * @return String
62      */

63     public String JavaDoc getDescription() {
64         return description;
65     }
66
67     /**
68      * @return int
69      */

70     public int getId() {
71         return id;
72     }
73
74     /**
75      * @return String
76      */

77     public String JavaDoc getName() {
78         return name;
79     }
80
81     /**
82      * Sets the description.
83      * @param description The description to set
84      */

85     public void setDescription(String JavaDoc description) {
86         this.description = description;
87     }
88
89     /**
90      * Sets the id.
91      * @param id The id to set
92      */

93     public void setId(int id) {
94         this.id = id;
95     }
96
97     /**
98      * Sets the name.
99      * @param name The name to set
100      */

101     public void setName(String JavaDoc name) {
102         this.name = name;
103     }
104
105     /**
106      * @return Map
107      */

108     public Map JavaDoc getProperties() {
109         return properties;
110     }
111
112     /**
113      * Sets the properties.
114      * @param properties The properties to set
115      */

116     public void setProperties(Map JavaDoc properties) {
117         this.properties = properties;
118     }
119
120     /**
121      * @return int
122      */

123     public int getMessages() {
124         return messages;
125     }
126
127     /**
128      * @return int
129      */

130     public int getThreads() {
131         return threads;
132     }
133
134     /**
135      * Sets the messages.
136      * @param messages The messages to set
137      */

138     public void setMessages(int messages) {
139         this.messages = messages;
140     }
141
142     /**
143      * Sets the threads.
144      * @param threads The threads to set
145      */

146     public void setThreads(int threads) {
147         this.threads = threads;
148     }
149
150     /**
151      * @return
152      */

153     public int getApprovedMessages() {
154         return approvedMessages;
155     }
156
157     /**
158      * @return
159      */

160     public int getApprovedThreads() {
161         return approvedThreads;
162     }
163
164     /**
165      * @param i
166      */

167     public void setApprovedMessages(int i) {
168         approvedMessages = i;
169     }
170
171     /**
172      * @param i
173      */

174     public void setApprovedThreads(int i) {
175         approvedThreads = i;
176     }
177
178     /**
179      * @return
180      */

181     public int getModerationType() {
182         return moderationType;
183     }
184
185     /**
186      * @param i
187      */

188     public void setModerationType(int i) {
189         moderationType = i;
190     }
191
192     /**
193      * @return
194      */

195     public int getNotApprovedMessages() {
196         return notApprovedMessages;
197     }
198
199     /**
200      * @return
201      */

202     public int getNotApprovedThreads() {
203         return notApprovedThreads;
204     }
205
206     /**
207      * @param i
208      */

209     public void setNotApprovedMessages(int i) {
210         notApprovedMessages = i;
211     }
212
213     /**
214      * @param i
215      */

216     public void setNotApprovedThreads(int i) {
217         notApprovedThreads = i;
218     }
219
220
221
222     /**
223      * @return
224      */

225     public boolean isAdmin() {
226         return admin;
227     }
228
229     /**
230      * @param b
231      */

232     public void setAdmin(boolean b) {
233         admin = b;
234     }
235
236 }
237
Popular Tags