userconfigmgr.java

来自「源码/软件简介: 云网论坛1.1RC国际版是采用JSP开发的集论坛、CMS(网」· Java 代码 · 共 47 行

JAVA
47
字号
package com.redmoon.blog;

import javax.servlet.http.HttpServletRequest;
import cn.js.fan.util.ErrMsgException;
import cn.js.fan.util.ResKeyException;

/**
 * <p>Title: </p>
 *
 * <p>Description: </p>
 *
 * <p>Copyright: Copyright (c) 2005</p>
 *
 * <p>Company: </p>
 *
 * @author not attributable
 * @version 1.0
 */
public class UserConfigMgr {
    public UserConfigMgr() {
    }

    public boolean create(HttpServletRequest request) throws
            ErrMsgException {
        com.redmoon.forum.Privilege pvg = new com.redmoon.forum.Privilege();
        if (pvg.isUserLogin(request)) {
            UserConfigForm ucf = new UserConfigForm(request);
            ucf.checkCreate();
            UserConfigDb ucd = ucf.getUserConfigDb();
            return ucd.create();
        } else
            throw new ErrMsgException("您尚未登陆!");
    }

    public boolean modify(HttpServletRequest request) throws
            ErrMsgException, ResKeyException {
        com.redmoon.forum.Privilege pvg = new com.redmoon.forum.Privilege();
        if (pvg.isUserLogin(request)) {
            UserConfigForm ucf = new UserConfigForm(request);
            ucf.checkModify();
            UserConfigDb ucd = ucf.getUserConfigDb();
            return ucd.save();
        } else
            throw new ErrMsgException("您尚未登陆!");
    }
}

⌨️ 快捷键说明

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