forumservice.java

来自「jive 论坛所有的java源码」· Java 代码 · 共 61 行

JAVA
61
字号
package com.jdon.jive;

import com.jivesoftware.forum.UnauthorizedException;
import com.jivesoftware.forum.ForumNotFoundException;
import java.util.Iterator;
import com.jivesoftware.forum.Forum;

public interface ForumService {
  /**
   * Returns the forum with the specified forumID.
   *
   * @param forumID the id of the forum to return.
   * @return the Forum specified by forumID.
   * @throws UnauthorizedException if not allowed to read the forum.
   * @throws ForumNotFoundException if the requested forum does not exist.
   */
  public abstract Forum getForum(long forumID)
          throws ForumNotFoundException, UnauthorizedException;

  /**
   * Returns the Forum with the specified name.
   *
   * @param name the name of the forum to return.
   * @return the forum with the specified name.
   * @throws ForumNotFoundException if the requested forum does not exist.
   * @throws UnauthorizedException if not allowed to read the forum.
   */
  public abstract Forum getForum(String name)
          throws ForumNotFoundException, UnauthorizedException;

  /**
   * Returns the total number of forums. This number might not agree
   * with the number of forums returned by ForumFactory.forums() since that
   * method return an Iterator of forums that a user has READ access for.
   *
   * @return the total number of forums.
   */
  public abstract int getForumCount();

  /**
   * Returns an Iterator of Forum objects for all the forums in the system
   * that the user has READ access for. Read access can be granted in the
   * following ways:
   * <ul>
   *   <li> Anonymous read permission is enabled for the forum; anyone can
   *        read it.
   *   <li> The "all users" read permission is set so that any registered
   *        user can read the forum.
   *   <li> The user belongs to a group that has been granted read permission.
   *   <li> The user has been specifically granted read permission.
   *   <li> The current user is a system admin or admin of this forum. This
   *        allows automatic read permission.
   * </ul>
   *
   * @return an Iterator of Forum objects for all forums in the system that
   *    the user has read permission for.
   */
    public abstract Iterator forums();

}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?