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

📄 portletbeanset.java

📁 java 写的一个新闻发布系统
💻 JAVA
字号:
package org.jahia.layout;/** * Title:        Simple container for portlet beans * Description: * Copyright:    Copyright (c) 2002 * Company:      Jahia Ltd * @author Serge Huber * @version 1.0 */import java.util.Vector;import java.util.Enumeration;import org.jahia.exceptions.JahiaException;public class PortletBeanSet extends Vector {    public PortletBeanSet() {    }    /**     * Retrieves a portlet in the set by using it's identifier     * @param portletID identifier of the portlet to retrieve     * @returns a PortletBean object corresponding to the given identifier     * @throws JahiaException if the object is not found in the portlet set.     */    public PortletBean findPortlet(int portletID)    throws JahiaException {        Enumeration portletList = this.elements();        while (portletList.hasMoreElements()) {            PortletBean curPortlet = (PortletBean) portletList.nextElement();            if (curPortlet.getPortletID() == portletID) {                return curPortlet;            }        }        throw new JahiaException("PortletBeanSet.findPortlet",                                 "Portlet not found",                                 JahiaException.ERROR,                                 JahiaException.DATA_ERROR);    }    /**     * This function doesn't do much in this set object, but we have it here     * to make the understanding of the PortletGrid and PortletSpanningGrid     * implementations clearer. Also this provides just a little help in the     * type checking, since we should only add PortletBean objects to this set     * and nothing else.     * @param portlet the portlet to be added to the set     * @returns true (as per the general contract of Collection.add).     */    public boolean add(PortletBean portlet) {        return super.add(portlet);    }}

⌨️ 快捷键说明

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