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

Quick Search    Search Deep

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


1   /* $Header: /home/CVS/rjp/src/com/RuntimeCollective/bboard/bean/Message.java,v 1.9 2003/09/30 15:12:43 joe Exp $
2    * $Revision: 1.9 $
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.content.bean.Content;
33  import com.RuntimeCollective.webapps.bean.User;
34  
35  import java.sql.SQLException;
36  import java.util.Date;
37  
38  /**
39   * An interface defining a bulletin board message.
40   * <p>
41   * If you want to be spared the hassle of writing JSPs for the creation of your Message objects,
42   * do have a look at the pages written for the Sussex Enterprise project. You can find them by
43   * checking out the relevent project: "cvs co rsework", then look in rsework/web and in rsework/web/admin.
44   * <p>
45   * The pages are called add/edit/delete(Topic)MessageXXX.jsp. They should be pretty self-explanatory.
46   * The rsework/struts-config.xml file is also worth checking, for the action mappings etc.
47   * <p>
48   * And while you're at it, why not vanilla them and copy them to bboard/web/admin ...
49   * <p>
50   * You can also check the Sussex Enterprise staging server (ask Fabrice, JoeH or Sophie).
51   *
52   * @version $Id: Message.java,v 1.9 2003/09/30 15:12:43 joe Exp $
53   * @see com.RuntimeCollective.bboard.bean.Topic
54   * @see com.RuntimeCollective.bboard.bean.Board
55   */
56  public interface Message extends Content {
57  
58      /** The name of the database table for this bean type. */    
59      public static final String DATABASE_TABLE = "bboard_message";
60  
61      /** Get the topic that this message is part of. */
62      public Topic getTopic();
63      /** Set the topic that this message is part of. */
64      public void setTopic(Topic topic);
65  
66      /** Get a string identifying the flag to be shown next to this message. */
67      public String getFlag();
68      /** Set a string identifying the flag to be shown next to this message. */
69      public void setFlag(String flag);
70  
71      /** Get the id of the message that this is a response to (or -1 if this is not a response). */
72      public int getResponseId();
73      /** Set the id of the message that this is a response to (or -1 if this is not a response). */
74      public void setResponseId(int responseId);
75  
76      /** Get the message that this is a response to. */
77      public Message getResponse();
78  
79      /** Set the message that this is a response to. */
80      public void setResponse(Message previous);
81  
82      // == Other Methods ===================================================
83  
84      /** Set the content. */
85      public void setContent(String content);
86  
87      /** Set the content under a given format. */
88      public void setContent(String content, String format);
89  
90      /** Set the content. */
91      public String getContent();
92  
93      /** Set the content under a given format. */
94      public String getContent(String format);
95  
96      /** Set the content. */
97      // public void setMyContent(String content);
98  
99      /** Set the content under a given format. */
100     // public void setMyContent(String content, String format);
101 
102     /** Set the content. */
103     // public String getMyContent();
104 
105     /** Set the content under a given format. */
106     // public String getMyContent(String format);
107 
108     /** Whether this message is new to this user. */
109     public boolean isNew( User user );
110 }