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

📄 portletrole.java

📁 GridSphere 门户 提供一个基于 portlet 的高级开放源代码门户。GridSphere 是在欧盟提供基金的 GridLab 项目下开发的
💻 JAVA
字号:
/* * @author <a href="mailto:novotny@gridsphere.org">Jason Novotny</a> * @author <a href="mailto:oliver@wehrens.de">Oliver Wehrens</a> * @version $Id: PortletRole.java 4496 2006-02-08 20:27:04Z wehrens $ */package org.gridsphere.services.core.security.role;import java.io.Serializable;/** * The <code>PortletRole</code> describes the supported portlet roles used * by the portal. */public class PortletRole implements Serializable, Cloneable {    private String oid = null;    private String roleName = null;    private String description = "";    // if 0 isdefault is false    private Integer isDefault = 0;    private static final String USER_ROLE_STRING = "USER";    private static final String ADMIN_ROLE_STRING = "ADMIN";    public static final PortletRole USER = new PortletRole(USER_ROLE_STRING);    public static final PortletRole ADMIN = new PortletRole(ADMIN_ROLE_STRING);    public PortletRole() {    }    /**     * Constructs an instance of PortletRole     *     * @param roleName the role name     */    public PortletRole(String roleName) {        this.roleName = roleName;    }    public String getOid() {        return oid;    }    public void setOid(String oid) {        this.oid = oid;    }    public void setIsDefault(Integer isDefault) {        this.isDefault = isDefault;    }    public Integer getIsDefault() {        return isDefault;    }    /**     * Returns the role name     *     * @return the role name     */    public String getName() {        return roleName;    }    /**     * Sets the role name     *     * @param roleName the role name     */    public void setName(String roleName) {        this.roleName = roleName;    }    public String getDescription() {        return description;    }    public void setDescription(String description) {        this.description = description;    }    public String toString() {        return roleName;    }    public Object clone() throws CloneNotSupportedException {        PortletRole r = (PortletRole) super.clone();        r.roleName = this.roleName;        return r;    }    public boolean equals(Object object) {        if (object != null && (object.getClass().equals(this.getClass()))) {            PortletRole portletRole = (PortletRole) object;            return (roleName.equals(portletRole.getName()));        }        return false;    }    public int hashCode() {        return roleName.hashCode();    }}

⌨️ 快捷键说明

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