⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 group.java

📁 一套完整的工商12315的源程序jsp部分在12315里,后台JAVA部分在gs12315src里,没有打包数据库.
💻 JAVA
字号:
package com.gs.db;

import java.util.*;
/**
 * Organizes Users into a group for easier permissions management .
 * In this way, Groups essentially serve the same purpose that
 * they do in Unix or Windows.<p>
 *
 * Security for Group objects is provide by GroupProxy protection proxy objects.
 *
 * @see User
 */

public interface Group {

     /**
     * Returns the id of the group.
     *
     * @return the id of the group.
     */
   public int getID();
    
     /**
     * Returns the name of the group. For example, 'XYZ Admins'.
     *
     * @return the name of the group.
     */
   public String getName();
   
    /**
     * Sets the name of the group. For example, 'XYZ Admins'.<p>
     *
     * This method is restricted to those with group administration permission.
     *
     * @param name the name for the group.
     * @throws UnauthorizedException if does not have group admin permissions.
     */
    public void setName(String name) throws UnauthorizedException;
    
    /**
     * Returns the description of the group. The description often summarizes
     * a group's function, such as 'Administrators of the XYZ forum'.
     *
     * @return the description of the group.
     */
    public String getDescription();
    
    /**
     * Sets the description of the group.
     *
     * The description often summarizes a group's function, such as
     * 'Administrators '.<p>
     *
     * This method is restricted to those with group administration permission.
     *
     * @param name the description of the group.
     * @throws UnauthorizedException if does not have group admin permissions.
     */
    public void setDescription(String description) throws UnauthorizedException;

    /**
     * Adds a member to the group.<p>
     *
     * This method is restricted to those with group administration permission.
     *
     * @param user the User to add to the group.
     * @throws UnauthorizedException if does not have group admin permissions.
     */    
    public void addMember(User user) throws UnauthorizedException;
    
    /**
     * Removes a member from the group. If the User is not in the group, this
     * method does nothing.<p>
     *
     * This method is restricted to those with group administration permission.
     *
     * @param user the User to remove from the group.
     * @throws UnauthorizedException if does not have group admin permissions.
     */
    public void removeMember(User user) throws UnauthorizedException;
    /**
     * Returns true if if the User is a member of the group.
     *
     * @return true if the User is a member of the group.
     */
    public boolean isMember(User user);
    
    /**
     * Returns the number of group members.
     *
     * @return the number of group members.
     */
    public int getMemberCount();
    /**
     * An iterator for all the users that are members of the group.
     *
     * @return an Iterator for all members of the group.
     */
    public Iterator members();
    
    /**
     * Grants administrator privileges of the group to a user.<p>
     *
     * This method is restricted to those with group administration permission.
     *
     * @param user the User to grant adminstrative privileges to.
     * @throws UnauthorizedException if does not have group admin permissions.
     */
    public void addAdministrator(User user) throws UnauthorizedException;
    /**
     * Revokes administrator privileges of the group to a user.<p>
     *
     * This method is restricted to those with group administration permission.
     *
     * @param user the User to grant adminstrative privileges to.
     * @throws UnauthorizedException if does not have group admin permissions.
     */
    public void removeAdministrator(User user) throws UnauthorizedException;
    
    /**
     * Returns true if the User has group administrator permissions. Group
     * administrators are also considered to be members.
     *
     * @return true if the User is an administrator of the group.
     */
    public boolean isAdministrator(User user);

    /**
     * Returns the number of group administrators.
     *
     * @return the number of group administrators.
     */
    public int getAdministratorCount();
    /**
     * An iterator for all the users that are administrators of the group.
     *
     * @return an Iterator for all administrators of the group.
     */
    public Iterator administrators();
    /**
     * Returns the permissions for the group that correspond to the
     * passed-in Authorization.
     *
     * @param authorization the auth token to lookup permissions for.
     */
     public abstract IofficePermissions getPermissions(Authorization authorization);
     
    /**
     * Returns true if the handle on the object has the permission specified.
     * A list of possible permissions can be found in the ForumPermissions
     * class. Certain methods of this class are restricted to certain
     * permissions as specified in the method comments.
     *
     * @param type a permission type.
     * @return true if the specified permission is valid.
     * @see IofficePermissions
     */
    public boolean hasPermission(int type);
    
    /**
     * Returns true if the group is associated with a unit.
     *
     * @return true if the group is associated with a unit..
     * @see Unit
     */
    public boolean hasAssociateUnit();
    
    /**
     * Returns the unit object that group is associated with
     *
     * @return the Unit object that group is associated with
     * @see Unit
     */
    public Unit getAssociateUnit();		/* return null if not linked with Unit */
    
    /**
     * Returns the priority level of the group in terms of being
     * associated with a unit. Now this function is the synonym of 
     * <code >getPriority() </code>
     * @return priority level ( 0 max, 1,2, .. lower )
     */
    public int getPriorityInUnit();			/*return -1 if not linked with Unit*/
    
    /**
     * Break the association with with a unit
     *
     *@thows UnauthorizedException if it doesnot have system-admin permission
     * @see Unit
     */    
    public void unlinkUnit() throws UnauthorizedException ;
        
    /**
     * Establish the association with a unit
     *
     *@thows UnauthorizedException if it doesnot have system-admin permission
     * @see Unit
     */    
    public void linkToUnit(Unit unit) throws UnauthorizedException;
    
    /**
     * Set the priority level of the group
     *
     *@thows UnauthorizedException if it doesnot have system-admin permission
     * @see Unit
     */    
    public void setPriority(int priority) throws UnauthorizedException;
    
    /**
     * Synonym of getPriorityInUnit
     * @return the priority level of the group
     */
    public int getPriority();
    
    
}

⌨️ 快捷键说明

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