📄 forum.java
字号:
/**
* $RCSfile: Forum.java,v $
* $Revision: 1.1.1.1 $
* $Date: 2002/09/09 13:50:41 $
*
* New Jive from Jdon.com.
*
* This software is the proprietary information of CoolServlets, Inc.
* Use is subject to license terms.
*/
package com.jivesoftware.forum;
//import com.jivesoftware.forum.gateway.GatewayManager;
import java.util.Date;
import java.util.Iterator;
import java.util.Enumeration;
/**
* A top level container for discussions. It contains a list of threads, each
* of which contains a tree of messages.
*/
public interface Forum {
/**
* Returns the unique id of the forum.
*
* @return the unique id of the forum.
*/
public long getID();
/**
* Returns the name of the forum. Every forum name in the system must be
* unique. This restriction allows one to lookup a forum by name
* as well as by ID.
*
* @return the name of the forum.
* @see ForumFactory#getForum(String)
*/
public String getName();
/**
* Sets the name of a the forum. Every forum name in the system must be
* unique. However, this restriction allows one to lookup a forum by name
* as well as by ID.<p>
*
* An exception will be thrown if a forum with the same name as the new
* name already exists.
*
* @param name the name of the forum.
* @throws UnauthorizedException if does not have ADMIN permissions.
* @throws ForumAlreadyExistsException if a forum with the specified name
* already exists.
*/
public void setName(String name) throws UnauthorizedException,
ForumAlreadyExistsException;
/**
* Returns the description of the forum. A description should normally be
* no longer than thirty words so that it can be easily displayed in a list
* of forums on a web page.
*
* @return the description of the forum.
*/
public String getDescription();
/**
* Sets the description of the forum. A description should normally be
* no longer than thirty words so that it can be easily displayed in a list
* of forums on a web page.
*
* @param description the description of the forum.
* @throws UnauthorizedException if does not have ADMIN permissions.
*/
public void setDescription(String description) throws UnauthorizedException;
/**
* Returns the Date that the forum was created.
*
* @return the Date the forum was created.
*/
public Date getCreationDate();
/**
* Sets the creation date of the forum. In most cases, the creation date
* will default to when the forum was entered into the system. However,
* the creation date needs to be set manually when importing data.
* In other words, skin authors should ignore this method since it only
* intended for system maintenance.
*
* @param creationDate the date the forum was created.
* @throws UnauthorizedException if does not have ADMIN permissions.
*/
public void setCreationDate(Date creationDate) throws UnauthorizedException;
/**
* Returns the Date that the forum was last modified. In other words, the
* date of the most recent message or thread in the forum.
*
* @return the Date the forum was last modified.
*/
public Date getModifiedDate();
/**
* Sets the date the forum was last modified. In most cases, last modifed
* will default to when the forum data was last changed. However,
* the last modified date needs to be set manually when importing data.
* In other words, skin authors should ignore this method since it only
* intended for system maintenance.
*
* @param modifiedDate the date the forum was modified.
* @throws UnauthorizedException if does not have ADMIN permissions.
*/
public void setModifiedDate(Date modifiedDate) throws UnauthorizedException;
/**
* Returns the default number of moderation points for threads created in
* the forum. The default moderation points value can be used in
* conjunction with the minimum thread moderation points value to
* effectively turn moderation on or off. Consider a default value of 0 and
* a minimum value of 1 -- this will mean that new threads will
* be created below the display threshold of 1, and must be assigned a
* moderation point before being visible.<p>
*
* By default, the minimum and default thread moderation value is 1.
*
* @return the default number of moderation points assigned to threads.
*/
public int getModerationDefaultThreadValue();
/**
* Sets the default number of moderation points for threads created in the
* forum. The default moderation points value can be used in
* conjunction with the minimum thread moderation points value to
* effectively turn moderation on or off. Consider a default value of 0 and
* a minimum value of 1 -- this will mean that new threads will
* be created below the display threshold of 1, and must be assigned a
* moderation point before being visible.<p>
*
* By default, the minimum and default thread moderation value is 1.
*
* @param value default number of moderation points for threads.
* @throws UnauthorizedException if does not have ADMIN or MODERATE_THREADS
* permissions.
*/
public void setModerationDefaultThreadValue(int value) throws UnauthorizedException;
/**
* Returns the default number of moderation points for messages created in
* the forum. The default moderation points value can be used in
* conjunction with the minimum message moderation points value to
* effectively turn moderation on or off. Consider a default value of 0 and
* a minimum value of 1 -- this will mean that new messages will
* be created below the display threshold of 1, and must be assigned a
* moderation point before being visible.<p>
*
* By default, the minimum and default message moderation value is 1.
*
* @return the default number of moderation points assigned to messages.
*/
public int getModerationDefaultMessageValue();
/**
* Sets the default number of moderation points for threads created in the
* forum. The default moderation points value can be used in
* conjunction with the minimum thread moderation points value to
* effectively turn moderation on or off. Consider a default value of 0 and
* a minimum value of 1 -- this will mean that new messages will
* be created below the display threshold of 1, and must be assigned a
* moderation point before being visible.<p>
*
* By default, the minimum and default message moderation value is 1.
*
* @param value default number of moderation points for messages.
* @throws UnauthorizedException if does not have ADMIN or MODERATE_MESSAGES
* permissions.
*/
public void setModerationDefaultMessageValue(int value) throws UnauthorizedException;
/**
* Returns the minimum number of moderation points necessary for threads to
* be visible in the forum. The default moderation points value can be used in
* conjunction with the minimum thread moderation points value to
* effectively turn moderation on or off. Consider a default value of 0 and
* a minimum value of 1 -- this will mean that new threads will
* be created below the display threshold of 1, and must be assigned a
* moderation point before being visible.<p>
*
* By default, the minimum and default thread moderation value is 1.
*
* @return the minimum number of moderation points for threads to be visible.
*/
public int getModerationMinThreadValue();
/**
* Sets the default number of moderation points necessary for threads to be
* visible in the forum. The default moderation points value can be used in
* conjunction with the minimum thread moderation points value to
* effectively turn moderation on or off. Consider a default value of 0 and
* a minimum value of 1 -- this will mean that new messages will
* be created below the display threshold of 1, and must be assigned a
* moderation point before being visible.<p>
*
* By default, the minimum and default message moderation value is 1.
*
* @param value the minimum number of moderation points for threads to be
* visible.
* @throws UnauthorizedException if does not have ADMIN or MODERATE_THREADS
* permissions.
*/
public void setModerationMinThreadValue(int value) throws UnauthorizedException;
/**
* Returns the minimum number of moderation points necessary for messages to
* be visible in the forum. The default moderation points value can be used in
* conjunction with the minimum thread moderation points value to
* effectively turn moderation on or off. Consider a default value of 0 and
* a minimum value of 1 -- this will mean that new threads will
* be created below the display threshold of 1, and must be assigned a
* moderation point before being visible.<p>
*
* By default, the minimum and default thread moderation value is 1.
*
* @return the minimum number of moderation points for threads to be visible.
*/
public int getModerationMinMessageValue();
/**
* Sets the default number of moderation points necessary for messages to be
* visible in the forum. The default moderation points value can be used in
* conjunction with the minimum thread moderation points value to
* effectively turn moderation on or off. Consider a default value of 0 and
* a minimum value of 1 -- this will mean that new messages will
* be created below the display threshold of 1, and must be assigned a
* moderation point before being visible.<p>
*
* By default, the minimum and default message moderation value is 1.
*
* @param value the minimum number of moderation points for messages to be
* visible.
* @throws UnauthorizedException if does not have ADMIN or MODERATE_MESSAGES
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -