groupmanager.java
来自「Jive是基于JSP/JAVA技术构架的一个大型BBS论坛系统,这是Jive论坛」· Java 代码 · 共 99 行
JAVA
99 行
/** * $RCSfile: GroupManager.java,v $ * $Revision: 1.3 $ * $Date: 2002/06/05 16:11:04 $ * * 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 java.util.Iterator;/** * Manages groups.<p> * * In some cases, you may wish to plug in your own group system implementation. * In that case, you should set the Jive property GroupManager.className with * the name of your GroupManager class. Your class must have a public, * no-argument constructor. The class must also create and return Group object * implementations as necessary. * * @see Group * @see ForumFactory#getGroupManager() */public interface GroupManager { /** * Factory method for creating a new Group. A unique name is the only * required field. * * @param name the new and unique name for the group. * @return a new Group. * @throws GroupAlreadyExistsException if the group name already exists in * the system. */ public Group createGroup(String name) throws UnauthorizedException, GroupAlreadyExistsException; /** * Gets a Group by ID. * * throws GroupNotFoundException if the group does not exist. */ public Group getGroup(long groupID) throws GroupNotFoundException; /** * Gets a Group by name. * * throws GroupNotFoundException if the group does not exist. */ public Group getGroup(String name) throws GroupNotFoundException; /** * Deletes a group from the system. * * @param group the group to delete. * @throws UnauthorizedException if not a system administrator. */ public void deleteGroup(Group group) throws UnauthorizedException; /** * Returns the total number of groups in the system. * * @return the total number of groups. */ public int getGroupCount(); /** * Returns an iterator for all groups in the system. * * @return an Iterator for all groups. */ public Iterator groups(); /** * Returns an iterator for all groups starting at startIndex with the * given number of results. This is useful to support pagination in a GUI * where you may only want to display a certain number of results per page. * It is possible that the number of results returned will be less than * that specified by numResults if numResults is greater than the number * of records left in the system to display. * * @param startIndex the beginning index to start the results at. * @param numResults the total number of results to return. * @return an Iterator for all groups in the specified range. */ public Iterator groups(int startIndex, int numResults); /** * Returns an iterator for all groups that a user is a member of. * * @param user the user to get a list of groups for. * @return all groups that <tt>user</tt> is a member of. */ public Iterator userGroups(User user);}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?