forum.java
来自「Jive是基于JSP/JAVA技术构架的一个大型BBS论坛系统,这是Jive论坛」· Java 代码 · 共 498 行 · 第 1/2 页
JAVA
498 行
/** * $RCSfile: Forum.java,v $ * $Revision: 1.2 $ * $Date: 2002/03/28 04:19:56 $ * * Copyright (C) 1999-2002 CoolServlets, Inc. All rights reserved. * * 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;/** * A top level container for discussions. It contains a list of threads, each * of which contains a tree of messages. * * @author Matt Tucker */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 * permissions. */ public void setModerationMinMessageValue(int value) throws UnauthorizedException; /** * Returns an extended property of the forum. Each forum can have an
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?