KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > javabb > infra > JbbConfig


1 package org.javabb.infra;
2
3 import org.javabb.vh.ForumConfig;
4 import org.javabb.vo.User;
5
6 /*
7  * Copyright 2004 JavaFree.org
8  *
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  * http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  */

21
22 /**
23  * $Id: JbbConfig.java,v 1.9.8.1.2.2 2006/04/17 17:47:17 daltoncamargo Exp $
24  * @author Dalton Camargo - <a HREF="mailto:dalton@javabb.org">dalton@javabb.org </a> <br>
25  * @author Ronald Tetsuo Miura
26  */

27 public class JbbConfig {
28
29     private static final JbbConfig INSTANCE = new JbbConfig();
30
31     private User lastUserRegistered = new User();
32
33     private int numberOfUsers;
34
35     private int totalMessageCount;
36
37     /**
38      * @return config
39      */

40     public static JbbConfig getConfig() {
41         return INSTANCE;
42     }
43
44     /**
45      * Retorna o total de mensagens no fórum
46      * @return total
47      */

48     public int getTotalMessages() {
49         return totalMessageCount;
50     }
51
52     /**
53      * Retorna o total de usuários cadastrados no fórum
54      * @return total
55      */

56     public int getTotalUsers() {
57         return numberOfUsers;
58     }
59
60     /**
61      * Retorna o último usuário registrado no fórum
62      * @return last user
63      */

64     public User getLastUserRegistered() {
65         return lastUserRegistered;
66     }
67
68     /**
69      * @return config
70      */

71     public ForumConfig getForumConfig() {
72         return new ForumConfig();
73     }
74     
75 }
76
Popular Tags