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

📄 singledocumentuserlayoutstoremock.java

📁 uPortal是开放源码的Portal门户产品
💻 JAVA
字号:
package org.jasig.portal;import org.w3c.dom.Document;import org.jasig.portal.security.IPerson;import java.util.Random;/** * A mock of IUserLayoutStore interface that works with a single user layout * DOM document. * * @author <a href="mailto:pkharchenko@interactivebusiness.com">Peter Kharchenko</a> * @version 1.0 */public class SingleDocumentUserLayoutStoreMock extends UserLayoutStoreMock {    private static final Random rnd=new Random();    Document userLayout=null;    public SingleDocumentUserLayoutStoreMock(Document doc) {        this.userLayout=doc;    }    public Document getUserLayout(org.jasig.portal.security.IPerson person, UserProfile profile) throws Exception {        return this.userLayout;    }    public void setUserLayout(org.jasig.portal.security.IPerson person, UserProfile profile, org.w3c.dom.Document layoutXML, boolean channelsAdded) throws Exception {        this.userLayout=layoutXML;    }    public String generateNewChannelSubscribeId(IPerson person) throws Exception {        return new String("rid"+Integer.toString(rnd.nextInt()));    }    public String generateNewFolderId(IPerson person) throws Exception {        return new String("rid"+Integer.toString(rnd.nextInt()));    }}

⌨️ 快捷键说明

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