Le 29 oct. 04, � 14:32, Florian Leinberger a �crit :

we will very likely develop a cocoon-based bulletin-board if we don't find...

FYI here's the interface to the java forum component that we use for nouvo.

It doesn't handle user rights, and the message data is only user identification, title and plain text.

The data is stored in a relational database via OJB, in a single table with the appropriate indexes to be able to recreate the hierarchy in memory.

So this is much simpler that what you're trying to achieve, actually I'm wondering if a CMS (i.e document-oriented view) might be more appropriate for your problem given the relatively complex structure of your forum message object ("Beitrag" IIUC).

Adding logic to an existing repository (Jackrabbit or similar) might be very interesting to build a forum with the level of complexity that your spec seems to suggest.

Hope this helps,
-Bertrand


Here's the forum object data in our case. Message states are: new, accepted, rejected CREATE TABLE FORUM ( forum_id CHAR(15) NOT NULL, msg_id INT(10) NOT NULL, reply_to INT(10) NULL, nesting INT(5) NOT NULL, user_fprint VARCHAR(255), user_name CHAR(40), user_place CHAR(40), state CHAR(20) NOT NULL, creation_date TIMESTAMP NOT NULL, msg_title CHAR(255), msg_text TEXT, msg_path CHAR(255), OJB_VERSION INT(10) NOT NULL,

    INDEX forum_id_index (forum_id),
    INDEX msg_id_index (msg_id),
    INDEX reply_to_index (reply_to),
    INDEX state_index (state),

    PRIMARY KEY (msg_id)
);


And the java interface to the forum storage (if Ugo sees this he will kick me for putting "throws Exception" everywhere ;-)

public interface ForumManager extends Component {
    public static final String ROLE = ForumManager.class.getName();

/** get the latest N messages from given forum
* @param maxNestingLevel if >=0, only considers messages where nestingLevel is <= given value
* @return a Collection of ForumMessage
*/
public Collection getLatestMessages(String forumId,String state,int maxNestingLevel,int startIndex,int maxResults) throws Exception;

/** get one specific message */
public ForumMessage getMessageById(int messageId,boolean forEditing) throws Exception;

/** get one message in its context (replies, replied-to messages, etc)
* the paging options apply to the replies to the message
* @return a Collection of MessageContextItem
*/
public Collection getMessageAndContext(int messageId,String state,int startIndex,int maxResults) throws Exception;

    /** update given message */
    public void updateMessage(ForumMessage message) throws Exception;

    /** create an empty ForumMessage object, used to create messages */
    public ForumMessage createEmptyMessage() throws Exception;

/** post a new message to given forum, possibly in reply to another one
* @param inReplyTo ID of message to which we're replying, 0 if not a reply */
public void postMessage(ForumMessage message,int inReplyTo) throws Exception;

/** get all messages having a given state in given forum
* @param forumId if null or empty, search in all forums
* @return a Collection of ForumMessage
*/
public Collection getMessagesByState(String forumId,String state,boolean mostRecentFirst,int startIndex,int maxResults) throws Exception;
}


Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to