Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: com/RuntimeCollective/bboard/bean/Board.java


1   /* $Header: /home/CVS/rjp/src/com/RuntimeCollective/bboard/bean/Board.java,v 1.10 2003/09/30 15:12:43 joe Exp $
2    * $Revision: 1.10 $
3    * $Date: 2003/09/30 15:12:43 $
4    *
5    * ====================================================================
6    *
7    * Josephine : http://www.runtime-collective.com/josephine/index.html
8    *
9    * Copyright (C) 2003 Runtime Collective
10   * 
11   * This product includes software developed by the
12   * Apache Software Foundation (http://www.apache.org/).
13   *
14   * This library is free software; you can redistribute it and/or
15   * modify it under the terms of the GNU Lesser General Public
16   * License as published by the Free Software Foundation; either
17   * version 2.1 of the License, or (at your option) any later version.
18   *
19   * This library is distributed in the hope that it will be useful,
20   * but WITHOUT ANY WARRANTY; without even the implied warranty of
21   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
22   * Lesser General Public License for more details.
23   *
24   * You should have received a copy of the GNU Lesser General Public
25   * License along with this library; if not, write to the Free Software
26   * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
27   *
28   */
29  
30  package com.RuntimeCollective.bboard.bean;
31  
32  import com.RuntimeCollective.bboard.TopicList;
33  import com.RuntimeCollective.bboard.bean.Topic;
34  import com.RuntimeCollective.content.bean.Content;
35  import com.RuntimeCollective.webapps.bean.PermissionBean;
36  import com.RuntimeCollective.webapps.bean.User;
37  
38  import java.util.Date;
39  import java.util.Iterator;
40  import java.sql.SQLException;
41  
42  /**
43   * An interface that defines a bulletin board.
44   * <p>
45   * If you want to be spared the hassle of writing JSPs for the creation of your Board objects,
46   * do have a look at the pages written for the Sussex Enterprise project. You can find them by
47   * checking out the relevent project: "cvs co rsework", then look in rsework/web and in rsework/web/admin.
48   * <p>
49   * The pages are called add/edit/delete(Message)BoardXXX.jsp. They should be pretty self-explanatory.
50   * The rsework/struts-config.xml file is also worth checking, for the action mappings etc.
51   * <p>
52   * And while you're at it, why not vanilla them and copy them to bboard/web/admin ...
53   * <p>
54   * You can also check the Sussex Enterprise staging server (ask Fabrice, JoeH or Sophie).
55   *
56   * @version $Id: Board.java,v 1.10 2003/09/30 15:12:43 joe Exp $
57   * @see com.RuntimeCollective.bboard.TopicList
58   */
59  public interface Board extends Content, PermissionBean {
60  
61      /** The name of the database table for this bean type. */
62      public static final String DATABASE_TABLE = "bboard_board";
63  
64      // == Property methods ==================================
65   
66      /** Get whether this board is currently accepting new topics. */
67      public boolean getOpen();
68  
69      /** Set whether this board is currently accepting new topics.
70       * Depending on the implementation, this may also close all the topics
71       * associated with this board.
72       */
73      public void setOpen(boolean open);
74  
75      /** Get all the Topics for this MessageBoard, with their positions
76       * @return An Iterator of Iterators (Integer, Topic)
77       */
78      public Iterator getIndexedTopics();
79  
80      /** Get all the Topics for this MessageBoard
81       * @return An Iterator of Topic
82       */
83      public Iterator getTopics();
84  
85      /** Add a topic to this board. */
86      public void addTopic(Topic topic);
87  
88      /** Remove a topic from this board. */
89      public void removeTopic(Topic topic); 
90  
91      /** Get the list of topics for this board. */
92      public TopicList getTopicList();
93  
94      /** Get the list of topics for this board,
95       * ordered by message date (most recent first).
96       */
97      public TopicList getTopicListByMessageDate();
98  
99      // == Other methods ========================================
100 
101     /** Set the description under a given format. */
102     public void setDescription(String description, String format);
103 
104     /** Get the description under a given format. */
105     public String getDescription(String format);
106 
107     /** Whether this board contains any topics that contain any messages that have not been read by this user.
108      */
109     public boolean hasUnread(User user);
110 
111     /** Get the FAQ for this board. */
112     public Faq getFaq();
113 
114     /** Approve all the topics and messages in that Board (only relevent if you are using moderation). */
115     public void approveAll();
116 }
117 
118 
119 
120 
121 
122 
123 
124 
125 
126 
127 
128 
129 
130 
131 
132 
133 
134 
135 
136 
137 
138 
139 
140 
141 
142 
143