亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? jiveforumxml.java

?? java servlet著名論壇源代碼
?? JAVA
字號:
/*
 * $Header: /cvsroot/mvnforum/mvnforum/src/com/mvnforum/admin/importexport/jive/JiveForumXML.java,v 1.2 2004/01/18 19:13:10 minhnn Exp $
 * $Author: minhnn $
 * $Revision: 1.2 $
 * $Date: 2004/01/18 19:13:10 $
 *
 * ====================================================================
 *
 * Copyright (C) 2002-2004 by MyVietnam.net
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or any later version.
 *
 * All copyright notices regarding mvnForum MUST remain intact
 * in the scripts and in the outputted HTML.
 * The "powered by" text/logo with a link back to
 * http://www.mvnForum.com and http://www.MyVietnam.net in the
 * footer of the pages MUST remain visible when the pages
 * are viewed on the internet or intranet.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 *
 * Support can be obtained from support forums at:
 * http://www.mvnForum.com/mvnforum/index
 *
 * Correspondence and Marketing Questions can be sent to:
 * info@MyVietnam.net
 *
 * @author: Igor Manic   imanic@users.sourceforge.net
 */
package com.mvnforum.admin.importexport.jive;

import java.sql.Timestamp;

import com.mvnforum.admin.*;
import net.myvietnam.mvncore.exception.*;

/**
 * @author <a href="mailto:imanic@users.sourceforge.net">Igor Manic</a>
 * @version $Revision: 1.2 $, $Date: 2004/01/18 19:13:10 $
 * <br/>
 * <code>JiveForumXML</code> class encapsulates processing of
 * forums' definitions found in the Jive XML file. It implements
 * methods to be called from XML parsing routine, adds some additional
 * processing and checking, and calls corresponding methods of
 * <code>ForumXML</code> and other neccessary classes in order to perform
 * the actual creation of a forum, as well as assigning forum-specific
 * premissions to members and groups.
 */
public class JiveForumXML {

    private ForumXML forumXML=null;
    private boolean forumCreated=false;

    public JiveForumXML() {
        super();
        forumXML=new ForumXML();
        forumCreated=false;
    }

    public void setForumID(String id) {
        forumXML.setForumID(id);
    }

    /**
     * This method simply calls <code>setForumID()</code>.
     * It's defined only to avoid property-setter problems with digester
     * (since it doesn't seem to recognize <code>setForumID()</code> as a setter
     * method for <code>forumID</code> property).
     */
    public void setForumId(String id) {
        setForumID(id);
    }

    public int getForumID() { return forumXML.getForumID(); }

    public int getParentCategoryID() {
        return forumXML.getParentCategoryID();
    }

    private String forumName=null;
    public void setForumName(String value) throws CreateException {
        if ( (value==null) || (value.equals("")) ) {
            throw new CreateException("Cannot create a forum with an empty ForumName.");
        } else this.forumName=value;
    }

    private String forumDesc=null;
    public void setForumDescription(String value) throws CreateException {
        this.forumDesc=value;
    }

    private String forumCreationDate=null;
    public void setForumCreationDate(String value) throws CreateException {
        this.forumCreationDate=value;
    }

    private String forumModifiedDate=null;
    public void setForumModifiedDate(String value) throws CreateException {
        this.forumModifiedDate=value;
    }

    public void addJiveForum()
    throws CreateException, DuplicateKeyException, ObjectNotFoundException,
    DatabaseException, ForeignKeyNotFoundException {
        /* First check if the digester already called this method.
         * It will happen even under normal circumstances, if this forum has
         * subelements that need it already be defined, so they first call
         * this method to create forum before creating data that refer him.
         */
        if (forumCreated) return;
        //todo Igor: add checking of JiveXML.rootCategoryID to know whether the root category is created or not
        if ( (forumName==null) || (forumName.equals("")) ) {
            throw new CreateException("Cannot create a forum with an empty ForumName.");
        } else {
            forumXML.setParentCategoryID(JiveXML.rootCategoryID);
            String forumPassword=JiveXML.allForumsPassword;

            ImportJive.addMessage("Adding forum \""+forumName+"\".");
            forumXML.addForum(null/*lastPostMemberName*/, forumName, forumDesc,
                              forumCreationDate, forumModifiedDate, null/*forumLastPostDate*/,
                              null/*forumOrder*/, null/*forumType*/, null/*forumFormatOption*/,
                              null/*forumOption*/, null/*forumStatus*/,
                              null/*forumModerationMode*/, forumPassword,
                              null/*forumThreadCount*/, null/*forumPostCount*/);
            forumCreated=true;

            JiveXML.addedForum(forumXML); //update parents
        }
    }

    public void updateAddedThread(ThreadXML threadXML) throws ObjectNotFoundException,
    DatabaseException {
        if ((!forumCreated) || (forumXML.getForumID()<0)) return; //todo Igor: process this error
        forumXML.increaseThreadCount();
        JiveXML.addedThread(threadXML); //update parent category
    }

    public void updateAddedPost(PostXML postXML, String postUsername, Timestamp postCreationDate)
    throws ObjectNotFoundException, DatabaseException, ForeignKeyNotFoundException {
        if ((!forumCreated) || (forumXML.getForumID()<0)) return; //todo Igor: process this error
        forumXML.increasePostCount();
        forumXML.updateLastPostMemberName(postUsername);
        forumXML.updateLastPostDate(postCreationDate);
        JiveXML.addedPost(postXML); //update parent category
    }

    public void addJiveForumUser(String usertype, String username, String jivePermission)
    throws CreateException, DuplicateKeyException, ObjectNotFoundException,
    DatabaseException, ForeignKeyNotFoundException {
        if ( (!forumCreated) || (forumXML.getForumID()<0) ) {
            addJiveForum();
        }
        if (usertype==null) {
            throw new CreateException("Not enough data to create a member forum-specific permission.");

        } else if (usertype.equalsIgnoreCase("ANONYMOUS")) {
            int[] perms = JiveXML.convertMemberForumPermission(jivePermission);
            ImportJive.addMessage("Adding forum-specific permissions for guests.");
            for (int j=0; j<perms.length; j++) {
                try {
                    forumXML.addGuestMemberForumPermission(Integer.toString(perms[j]));
                } catch (DuplicateKeyException e) {
                    /* Ignore if we doubled some permissions.
                     * Because we convert each Jive permission into the list of
                     * MVN Forum permissions (can be more than one), some permissions
                     * could be generated twice, or more times.
                     */
                }
            }

        } else if (usertype.equalsIgnoreCase("REGISTERED_USERS")) {
            int[] perms = JiveXML.convertGroupForumPermission(jivePermission);
            ImportJive.addMessage("Adding forum-specific permissions for registered members.");
            for (int j=0; j<perms.length; j++) {
                try {
                    forumXML.addRegisteredMembersGroupForumPermission(Integer.toString(perms[j]));
                } catch (DuplicateKeyException e) {
                    /* Ignore if we doubled some permissions.
                     * Because we convert each Jive permission into the list of
                     * MVN Forum permissions (can be more than one), some permissions
                     * could be generated twice, or more times.
                     */
                }
            }

        } else if (usertype.equalsIgnoreCase("USER")) {
            int[] perms = JiveXML.convertMemberForumPermission(jivePermission);
            ImportJive.addMessage("Adding forum-specific permissions for member \""+username+"\".");
            for (int j=0; j<perms.length; j++) {
                try {
                    forumXML.addMemberForumPermission(username, Integer.toString(perms[j]));
                } catch (DuplicateKeyException e) {
                    /* Ignore if we doubled some permissions.
                     * Because we convert each Jive permission into the list of
                     * MVN Forum permissions (can be more than one), some permissions
                     * could be generated twice, or more times.
                     */
                }
            }
        } else {
            throw new CreateException("Invalid usertype. This Jive user forum-specific permission is ignored.");
        }
    }

    public void addJiveForumGroup(String groupname, String jivePermission)
    throws CreateException, DuplicateKeyException, ObjectNotFoundException,
    DatabaseException, ForeignKeyNotFoundException {
        if ( (!forumCreated) || (forumXML.getForumID()<0) ) {
            addJiveForum();
        }
        if ( (groupname==null) || (groupname.equals("")) ) {
            throw new CreateException("Not enough data to create a group permission.");
        } else {
            int[] perms = JiveXML.convertGroupForumPermission(jivePermission);
            ImportJive.addMessage("Adding forum-specific permissions for group \""+groupname+"\".");
            for (int j=0; j<perms.length; j++) {
                try {
                    forumXML.addGroupForumPermission(groupname,  Integer.toString(perms[j]));
                } catch (DuplicateKeyException e) {
                    /* Ignore if we doubled some permissions.
                     * Because we convert each Jive permission into the list of
                     * MVN Forum permissions (can be more than one), some permissions
                     * could be generated twice, or more times.
                     */
                }
            }
        }
    }


}


?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品18久久久久久久网站| 99re热这里只有精品视频| 国产真实精品久久二三区| 成人精品gif动图一区| 欧美午夜免费电影| 欧美激情在线一区二区| 午夜精品久久久久久久99水蜜桃 | 狠狠色丁香久久婷婷综合_中| 99re成人在线| 久久亚洲一区二区三区四区| 日韩黄色免费电影| 欧美亚洲自拍偷拍| 中文字幕一区二区三中文字幕 | 国产精品国产三级国产| 偷拍日韩校园综合在线| 91免费版pro下载短视频| 久久五月婷婷丁香社区| 美腿丝袜在线亚洲一区| 欧美日韩国产欧美日美国产精品| 亚洲视频1区2区| 粉嫩av一区二区三区粉嫩| 精品国产免费视频| 久久 天天综合| 日韩欧美综合一区| 蜜臀av一区二区在线免费观看| 欧美色大人视频| 亚洲一区二区在线免费看| 一本一道久久a久久精品综合蜜臀 一本一道综合狠狠老 | 在线一区二区视频| 亚洲图片欧美激情| 91在线看国产| 亚洲天堂a在线| aaa国产一区| 亚洲欧美影音先锋| 99久久婷婷国产| 亚洲欧美偷拍三级| 欧美性欧美巨大黑白大战| 亚洲综合图片区| 欧美色欧美亚洲另类二区| 亚洲成人av一区| 欧美男男青年gay1069videost| 亚洲成av人片一区二区三区| 欧美日韩一区中文字幕| 丝袜亚洲另类欧美综合| 日韩你懂的在线观看| 国内精品国产成人| 国产精品嫩草影院com| 91在线观看一区二区| 亚洲摸摸操操av| 欧美一区二区私人影院日本| 精品美女在线观看| 亚洲欧美日韩中文字幕一区二区三区 | 91麻豆swag| 奇米精品一区二区三区在线观看| 欧美精品一二三四| 久久国产婷婷国产香蕉| 久久精品在这里| 91色.com| 奇米综合一区二区三区精品视频| 久久青草国产手机看片福利盒子| 国产69精品久久777的优势| 亚洲日本电影在线| 欧美日韩国产乱码电影| 国产一区二区三区不卡在线观看| 中文字幕中文字幕在线一区| 色婷婷综合五月| 美美哒免费高清在线观看视频一区二区| www国产成人| 色激情天天射综合网| 奇米色一区二区| 日韩理论电影院| 日韩欧美高清在线| 欧美在线观看视频一区二区三区| 久久精品国产在热久久| 中文字幕一区二区三区蜜月| 欧美高清dvd| 99re亚洲国产精品| 韩国成人精品a∨在线观看| 亚洲人成影院在线观看| 欧美电视剧在线观看完整版| 91在线观看一区二区| 极品少妇xxxx偷拍精品少妇| 一区二区在线免费观看| 久久久综合精品| 欧美美女直播网站| av在线这里只有精品| 精品一区二区三区在线观看| 亚洲欧美色图小说| 国产三级一区二区三区| 91精品国产综合久久国产大片| www.亚洲国产| 国产麻豆视频精品| 青青草成人在线观看| 亚洲免费av网站| 中文字幕免费不卡| 久久午夜免费电影| 精品欧美乱码久久久久久| 欧美性色黄大片| 一本到三区不卡视频| 国产成a人亚洲| 国产精品影视在线| 精品在线播放免费| 激情小说亚洲一区| 精品一区二区免费| 麻豆精品国产传媒mv男同| 日韩中文字幕亚洲一区二区va在线 | 欧美一区午夜精品| 欧美综合久久久| 色综合久久久久久久久久久| 波多野结衣亚洲一区| 高清shemale亚洲人妖| 国产成人啪免费观看软件| 精品一区二区三区不卡| 久久国产精品露脸对白| 秋霞av亚洲一区二区三| 蜜芽一区二区三区| 麻豆精品视频在线| 久久狠狠亚洲综合| 国产一区二区三区av电影| 精品亚洲免费视频| 国产一区999| 国产经典欧美精品| 丁香桃色午夜亚洲一区二区三区| 国产成人精品在线看| 不卡一区在线观看| 99re成人在线| 欧美日韩的一区二区| 欧美一级日韩一级| 久久综合一区二区| 国产精品美女一区二区三区 | 一区二区三区波多野结衣在线观看 | 麻豆精品久久久| 国产一区二区导航在线播放| 国产一区二区三区免费在线观看| 丁香婷婷综合色啪| 色偷偷成人一区二区三区91| 欧美精品vⅰdeose4hd| 精品国精品自拍自在线| 国产精品乱码一区二三区小蝌蚪| 亚洲天堂福利av| 日韩成人精品在线观看| 国产91精品免费| 91福利视频在线| 777奇米成人网| 久久亚洲二区三区| 亚洲综合激情网| 老司机精品视频在线| 99久久久久久| 欧美一区2区视频在线观看| 国产欧美日韩视频在线观看| 一区二区在线观看视频| 麻豆专区一区二区三区四区五区| 国产成人av一区| 欧美色网站导航| 国产亚洲欧美色| 亚洲自拍偷拍av| 国产精品99久久久久久久女警| 91小视频在线免费看| 精品欧美一区二区久久| 伊人开心综合网| 国产经典欧美精品| 欧美精品亚洲一区二区在线播放| 欧美xxxx老人做受| 一区二区三区精品在线观看| 国产综合久久久久影院| 欧美日韩激情一区二区| 国产三级一区二区| 美女一区二区三区在线观看| 91亚洲资源网| 久久久久久久久久久久久夜| 亚洲一二三四久久| 91在线免费看| 国产夜色精品一区二区av| 日韩电影免费在线看| 日本精品一区二区三区四区的功能| 久久蜜桃香蕉精品一区二区三区| 亚洲国产欧美日韩另类综合| 成人免费视频一区| xfplay精品久久| 奇米精品一区二区三区在线观看| 欧洲精品一区二区三区在线观看| 日本一二三不卡| 久久成人av少妇免费| 91超碰这里只有精品国产| 一区二区高清视频在线观看| 成人精品一区二区三区中文字幕| 精品国产一区久久| 日本不卡在线视频| 欧美另类高清zo欧美| 亚洲午夜日本在线观看| 91色综合久久久久婷婷| 亚洲人成人一区二区在线观看| 成人综合在线观看| 国产欧美日韩精品在线| 国产麻豆视频精品| 国产欧美日韩亚州综合 | 国产精品久久久久久久裸模| 国产精品资源站在线| 精品成a人在线观看| 韩国v欧美v亚洲v日本v|