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

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

?? jiveglobals.java

?? Jive(J道版) Jive(J道版)是在Jive 2.1版本基礎上改編而成
?? JAVA
字號:
/**
 * $RCSfile: JiveGlobals.java,v $
 * $Revision: 1.1.1.1 $
 * $Date: 2002/09/09 13:50:45 $
 *
 * New Jive  from Jdon.com.
 *
 * This software is the proprietary information of CoolServlets, Inc.
 * Use is subject to license terms.
 */

package com.jivesoftware.forum;

import com.jivesoftware.forum.util.XMLProperties;

import java.util.*;
import java.io.*;
import java.text.*;
import java.net.*;

/**
 * Contains constant values representing various objects in Jive as well as
 * other settings such as the global locale and Jive version number.<p>
 *
 * The class also controls Jive properties. Jive properties are only meant to
 * be set and retrevied by core Jive classes.
 * <p>
 * All properties are stored in the file <tt>jive_config.xml</tt> which is
 * located in the <tt>jiveHome</tt> directory. The location of that
 * directory should be specified one of two ways:<ol>
 *   <li>Indicate its value in the <tt>jive_init.properties</tt> file. This
 *       is a standard properties file so the property should be something
 *       like:<br>
 *       <tt>jiveHome=c:\\some\\directory\\jiveHome</tt> (Windows) <br>
 *       or <br>
 *       <tt>jiveHome=/home/some/directory/jiveHome</tt> (Unix)
 *       <p>
 *       The file must be in your classpath so that it can be loaded by Java's
 *       classloader.
 *   <li>Use another class in your VM to set the
 *      <tt>PropertyManager.jiveHome</tt> variable. This must be done before
 *      the rest of Jive starts up, for example: in a servlet that is set to run
 *      as soon as the appserver starts up.
 * </ol>
 * <p>
 * All Jive property names must be in the form <code>prop.name</code> - parts of
 * the name must be seperated by ".". The value can be any valid String,
 * including Strings with line breaks.
 */
public class JiveGlobals {

    // Constant values

    public static final int FORUM = 0;
    public static final int THREAD = 1;
    public static final int MESSAGE = 2;
    public static final int USER = 3;
    public static final int GROUP = 4;

    public static final int THREAD_NAME = 5;
    public static final int MESSAGE_SUBJECT = 6;
    public static final int MESSAGE_BODY = 7;
    public static final int CREATION_DATE = 8;
    public static final int MODIFIED_DATE = 9;
    public static final int EXTENDED_PROPERTY = 10;

    public static final int ANONYMOUS = 11;
    public static final int REGISTERED_USERS = 12;

    // Time values in milliseconds

    public static final long SECOND = 1000;
    public static final long MINUTE = 60 * SECOND;
    public static final long HOUR   = 60 * MINUTE;
    public static final long DAY    = 24 * HOUR;
    public static final long WEEK   = 7 * DAY;

    /**
     * The Major version number of Jive. i.e. 1.x.x
     */
    public static final int JIVE_MAJOR_VERSION = 2;

    /**
     * The Minor version number of Jive. i.e. x.1.x.
     */
    public static final int JIVE_MINOR_VERSION = 1;

    /**
     * The revision version number of Jive. i.e. x.x.1.
     */
    public static final int JIVE_REVISION_VERSION = 1;

    private static final String JIVE_CONFIG_FILENAME = "jive_config.xml";

    /**
     * Location of the jiveHome directory. All configuration files should be
     * located here. This value can be set explicitly by an outside class or
     * this class will attempt to load it from the <tt>jive_init.properties</tt>
     * file.
     */
    public static String jiveHome = null;

    /**
     * XML properties to actually get and set the Jive properties.
     */
    private static XMLProperties properties = null;

    private static Locale locale = null;
    private static TimeZone timeZone = null;
    private static DateFormat dateFormat = null;
    private static DateFormat dateTimeFormat = null;

    /**
     * Returns the version number of Jive as a String. i.e. major.minor.revision
     */
    public static String getJiveVersion() {
        return "<a href=http://www.jdon.com>Jive(J道)</a>)";
    }

    /**
     * Returns the global Locale used by Jive. A locale specifies language
     * and country codes, and is used for internationalization. The default
     * locale is Locale.US
     *
     * @return the global locale used by Jive.
     */
    public static Locale getLocale() {
        if (locale == null) {
            loadLocale();
        }
        return locale;
    }

    /**
     * Sets the global locale used by Jive. A locale specifies language
     * and country codes, and is used for internationalization. The default
     * locale is Locale.US
     *
     * @param locale the global Locale for Jive.
     */
    public static void setLocale(Locale newLocale) {
        locale = newLocale;
        // Save values to Jive properties.
        setJiveProperty("locale.country", locale.getCountry());
        setJiveProperty("locale.language", locale.getLanguage());
        // Reset the date formatter objects
        dateFormat = DateFormat.getDateInstance(DateFormat.MEDIUM, locale);
        dateTimeFormat = DateFormat.getDateTimeInstance(DateFormat.MEDIUM,
                DateFormat.MEDIUM, locale);
        dateFormat.setTimeZone(timeZone);
        dateTimeFormat.setTimeZone(timeZone);
    }

    /**
     * Returns the global TimeZone used by Jive. The default is the VM's
     * default time zone.
     *
     * @return the global time zone used by Jive.
     */
    public static TimeZone getTimeZone() {
        if (timeZone == null) {
            loadLocale();
        }
        return timeZone;
    }

    /**
     * Sets the global time zone used by Jive. The default time zone is the VM's
     * time zone.
     */
    public static void setTimeZone(TimeZone newTimeZone) {
        timeZone = newTimeZone;
        dateFormat.setTimeZone(timeZone);
        dateTimeFormat.setTimeZone(timeZone);
        setJiveProperty("locale.timeZone", timeZone.getID());
    }

    /**
     * Formats a Date object to return a date using the global locale.
     */
    public static String formatDate(Date date) {
        if (dateFormat == null) {
            loadLocale();
        }
        return dateFormat.format(date);
    }

    /**
     * Formats a Date object to return a date and time using the global locale.
     */
    public static String formatDateTime(Date date) {
        if (dateTimeFormat == null) {
            loadLocale();
        }
        return dateTimeFormat.format(date);
    }

    /**
     * Returns the location of the <code>jiveHome</code> directory.
     *
     * @return the location of the jiveHome dir.
     */
    public static String getJiveHome() {
        if (jiveHome == null) {
            jiveHome = new InitPropLoader().getJiveHome();
            // If jiveHome is still null, try loading it as a system property
            if (jiveHome == null) {
                jiveHome = System.getProperty("jiveHome");
            }
        }
        return jiveHome;
    }


    /**
     * Indicates whether or not we have read access to the <code>jiveHome</code>
     * directory.
     *
     * @return true if we have read access to jiveHome, false otherwise.
     */
    public static boolean isJiveHomeReadable() {
        return (new File(getJiveHome())).canRead();
    }

    /**
     * Indicates whether or not we have write access to the
     * <code>jiveHome</code> directory.
     *
     * @return true if we have write access to jiveHome, false otherwise.
     */
    public static boolean isJiveHomeWritable() {
        return (new File(getJiveHome())).canWrite();
    }

    /**
     * Returns a Jive property.
     *
     * @param name the name of the property to return.
     * @return the property value specified by name.
     */
    public static String getJiveProperty(String name) {
        loadProperties();
        return properties.getProperty(name);
    }

    /**
     * Sets a Jive property. If the property doesn't already exists, a new
     * one will be created.
     *
     * @param name the name of the property being set.
     * @param value the value of the property being set.
     */
    public static void setJiveProperty(String name, String value) {
        loadProperties();
        properties.setProperty(name, value);
    }

    /**
     * Deletes a Jive property. If the property doesn't exist, the method
     * does nothing.
     *
     * @param name the name of the property to delete.
     */
    public static void deleteJiveProperty(String name) {
        loadProperties();
        properties.deleteProperty(name);
    }

    /**
     * Loads properties if necessary. Property loading must be done lazily so
     * that we give outside classes a chance to set <tt>jiveHome</tt>.
     */
    private synchronized static void loadProperties() {
            // If jiveHome is still null, no outside process has set it and
            // we have to attempt to load the value from jive_init.properties,
            // which must be in the classpath.
            if (jiveHome == null) {
                jiveHome = new InitPropLoader().getJiveHome();
            }
            //Create a manager with the full path to the xml config file.
            properties = new XMLProperties(jiveHome + File.separator +
                    JIVE_CONFIG_FILENAME);

    }

    /**
     * Load locale and timezone information.
     */
    private synchronized static void loadLocale() {
        String language = getJiveProperty("locale.language");
        if (language == null) {
            language = "";
        }
        String country = getJiveProperty("locale.country");
        if (country == null) {
            country = "";
        }
        // If no locale info is specified, default to Locale.US
        if (language.equals("") && country.equals("")) {
            locale = Locale.US;
        }
        else {
            locale = new Locale(language, country);
        }
        String timeZoneID = getJiveProperty("locale.timeZone");
        if (timeZoneID == null) {
            timeZone = TimeZone.getDefault();
        }
        else {
            timeZone = TimeZone.getTimeZone(timeZoneID);
        }
        dateFormat = DateFormat.getDateInstance(DateFormat.MEDIUM, locale);
        dateTimeFormat = DateFormat.getDateTimeInstance(DateFormat.MEDIUM,
                DateFormat.MEDIUM, locale);
        dateFormat.setTimeZone(timeZone);
        dateTimeFormat.setTimeZone(timeZone);
    }
}

/**
 * A very small class to load the jive_init.properties file. The class is
 * needed since loading files from the classpath in a static context often
 * fails.
 */
class InitPropLoader {

    public String getJiveHome() {
        String jiveHome = null;
        Properties initProps = new Properties();
        InputStream in = null;
        try {
            in = getClass().getResourceAsStream("/jive_init.properties");
            initProps.load(in);
        }
        catch (Exception e) {
            System.err.println("Error reading Jive properties "
                + "in JiveGlobals");
            e.printStackTrace();
        }
        finally {
            try {
                if (in != null) { in.close(); }
            } catch (Exception e) {}
        }
        if (initProps != null) {
            jiveHome = initProps.getProperty("jiveHome");
            if (jiveHome != null) {
                jiveHome = jiveHome.trim();
                //Remove trailing slashes.
                while (jiveHome.endsWith("/") || jiveHome.endsWith("\\")) {
                    jiveHome = jiveHome.substring(0, jiveHome.length()-1);
                }
            }
        }
        return jiveHome;
    }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产a精品视频| 92国产精品观看| 中文在线一区二区| 欧美日韩三级在线| 播五月开心婷婷综合| 天天综合色天天综合色h| 久久精品无码一区二区三区| 欧美网站大全在线观看| 国产99久久久国产精品潘金 | 亚洲综合一区二区精品导航| 精品国偷自产国产一区| 欧美日本乱大交xxxxx| zzijzzij亚洲日本少妇熟睡| 久久99精品国产91久久来源 | 激情综合网av| 亚洲网友自拍偷拍| 亚洲视频一二三区| 国产视频不卡一区| 日韩欧美视频在线 | 国产精品天天看| 日韩视频在线一区二区| 欧美日韩免费在线视频| 91丝袜呻吟高潮美腿白嫩在线观看| 激情五月激情综合网| 日韩国产一二三区| 亚洲电影视频在线| 亚洲一区自拍偷拍| 亚洲一区二区偷拍精品| 亚洲男人的天堂av| 亚洲乱码中文字幕综合| 7777精品伊人久久久大香线蕉超级流畅| 一区二区三区日韩精品| 91精品国产综合久久精品图片| 免费观看30秒视频久久| 亚洲一卡二卡三卡四卡五卡| 日韩午夜精品视频| 91丨porny丨在线| 精久久久久久久久久久| 亚洲色图都市小说| 久久99热99| 国产精品美女久久福利网站| 欧美日韩国产小视频| 国产999精品久久| 日韩不卡免费视频| 亚洲成人av资源| 国产精品高清亚洲| 国产精品盗摄一区二区三区| 日韩中文字幕亚洲一区二区va在线| 不卡的av网站| 久久精品免费在线观看| 欧美日韩在线观看一区二区| 懂色av噜噜一区二区三区av| 日本欧洲一区二区| 亚洲激情在线激情| 日日噜噜夜夜狠狠视频欧美人| 国产日韩欧美精品在线| 国产精品九色蝌蚪自拍| 国产乱淫av一区二区三区| 久久精品人人做人人爽97| 欧美成人video| 精品国产一区二区三区久久影院| 久久婷婷成人综合色| 国产精品天天看| 亚洲精品中文在线| 五月天亚洲婷婷| 久久99精品国产.久久久久| 国产经典欧美精品| 日本道精品一区二区三区| 在线综合视频播放| 中文字幕精品在线不卡| 日本不卡不码高清免费观看| 激情五月激情综合网| www.欧美精品一二区| 欧美少妇xxx| 精品精品国产高清一毛片一天堂| 国产精品久久久久影院色老大| 亚洲自拍另类综合| 国内精品久久久久影院薰衣草| 成人激情电影免费在线观看| 欧美中文字幕不卡| 国产视频一区不卡| 亚洲大尺度视频在线观看| 国产精品一区二区久激情瑜伽| 一道本成人在线| 精品捆绑美女sm三区| 亚洲三级在线播放| 另类欧美日韩国产在线| 91麻豆国产香蕉久久精品| 日韩精品中午字幕| 一区二区三区四区不卡在线 | 91色九色蝌蚪| 欧美久久久久中文字幕| 国产精品区一区二区三| 日欧美一区二区| 亚洲一区二区欧美日韩| 亚洲一卡二卡三卡四卡| 午夜精品免费在线观看| 国产91精品一区二区麻豆网站| 丁香婷婷综合五月| 欧美v日韩v国产v| 亚洲欧洲av在线| 九九视频精品免费| 欧美日韩亚洲综合一区二区三区 | 国产精品传媒视频| 久久av资源网| 欧美精品xxxxbbbb| 亚洲色图欧洲色图| 国产成人精品免费网站| 日韩美女天天操| 亚洲综合一二三区| 不卡av在线网| 亚洲人xxxx| 成人妖精视频yjsp地址| 欧美日韩午夜在线视频| 69堂成人精品免费视频| 亚洲免费av网站| 91在线视频网址| 国产一区不卡精品| 韩国精品一区二区| 欧美亚洲愉拍一区二区| 91精品午夜视频| 亚洲午夜在线电影| 99国产麻豆精品| 国产欧美日韩不卡| 韩国v欧美v亚洲v日本v| 91精品国产91久久久久久一区二区| 亚洲免费观看高清完整| www.66久久| 国产精品久久久爽爽爽麻豆色哟哟 | 91丨九色丨尤物| 国产精品美女久久久久久久| 国产精品99久久久久久久女警| 欧美sm美女调教| 欧美aⅴ一区二区三区视频| 91麻豆精品国产91| 日韩国产精品久久久久久亚洲| 欧美亚洲愉拍一区二区| 亚洲国产精品麻豆| 精品视频一区二区不卡| 舔着乳尖日韩一区| 5858s免费视频成人| 强制捆绑调教一区二区| 日韩欧美一卡二卡| 久久电影网站中文字幕| 久久网站最新地址| 成人免费毛片aaaaa**| 欧美人与z0zoxxxx视频| 日日摸夜夜添夜夜添国产精品| 欧美一区二区大片| 激情综合色综合久久综合| 久久久午夜精品| 波多野洁衣一区| 一区二区在线看| 91.xcao| 国产精品自拍在线| 国产精品国产三级国产普通话蜜臀 | 欧美一区二区在线观看| 久久国产视频网| 国产色产综合产在线视频| 成人深夜视频在线观看| 亚洲人成网站在线| 91精品国产乱码久久蜜臀| 国产美女视频91| 亚洲欧美日韩国产综合在线 | 欧美日韩免费观看一区二区三区| 三级久久三级久久久| 精品久久久久久久久久久久久久久久久| 国产一区二区免费在线| 亚洲色图自拍偷拍美腿丝袜制服诱惑麻豆| 欧美在线影院一区二区| 久久成人免费网| 亚洲欧洲精品天堂一级| 欧美丰满美乳xxx高潮www| 国产一区欧美二区| 亚洲精选一二三| 日韩精品一区在线| 不卡欧美aaaaa| 青青草原综合久久大伊人精品| 久久久久久久久久久久久夜| 色域天天综合网| 精彩视频一区二区三区| 亚洲青青青在线视频| 亚洲精品一区二区精华| 日本伦理一区二区| 国产福利91精品| 亚洲va国产va欧美va观看| 国产午夜亚洲精品理论片色戒| 色狠狠桃花综合| 国产九九视频一区二区三区| 亚洲国产视频一区二区| 国产精品欧美经典| 日韩欧美亚洲国产精品字幕久久久 | 欧美高清视频不卡网| 成人v精品蜜桃久久一区| 青青草精品视频| 亚洲精品成人精品456| 久久亚洲欧美国产精品乐播| 在线中文字幕一区| 粉嫩绯色av一区二区在线观看 | 亚洲一区二区三区免费视频|