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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? configurationmanager.java

?? apache的log4j源碼
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements.  See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License.  You may obtain a copy of the License at *  *      http://www.apache.org/licenses/LICENSE-2.0 *  * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */package org.apache.log4j.lf5.viewer.configure;import org.apache.log4j.lf5.LogLevel;import org.apache.log4j.lf5.LogLevelFormatException;import org.apache.log4j.lf5.viewer.LogBrokerMonitor;import org.apache.log4j.lf5.viewer.LogTable;import org.apache.log4j.lf5.viewer.categoryexplorer.CategoryExplorerModel;import org.apache.log4j.lf5.viewer.categoryexplorer.CategoryExplorerTree;import org.apache.log4j.lf5.viewer.categoryexplorer.CategoryNode;import org.apache.log4j.lf5.viewer.categoryexplorer.CategoryPath;import org.apache.log4j.lf5.viewer.LogTableColumn;import org.apache.log4j.lf5.viewer.LogTableColumnFormatException;import org.w3c.dom.Document;import org.w3c.dom.NamedNodeMap;import org.w3c.dom.Node;import org.w3c.dom.NodeList;import javax.swing.*;import javax.swing.tree.TreePath;import javax.xml.parsers.DocumentBuilder;import javax.xml.parsers.DocumentBuilderFactory;import java.awt.*;import java.io.File;import java.io.FileWriter;import java.io.IOException;import java.io.PrintWriter;import java.util.*;import java.util.List;/** * <p>ConfigurationManager handles the storage and retrival of the state of * the CategoryExplorer * * @author Richard Hurst * @author Brad Marlborough */// Contributed by ThoughtWorks Inc.public class ConfigurationManager extends Object {  //--------------------------------------------------------------------------  //   Constants:  //--------------------------------------------------------------------------  private static final String CONFIG_FILE_NAME = "lf5_configuration.xml";  private static final String NAME = "name";  private static final String PATH = "path";  private static final String SELECTED = "selected";  private static final String EXPANDED = "expanded";  private static final String CATEGORY = "category";  private static final String FIRST_CATEGORY_NAME = "Categories";  private static final String LEVEL = "level";  private static final String COLORLEVEL = "colorlevel";  private static final String RED = "red";  private static final String GREEN = "green";  private static final String BLUE = "blue";  private static final String COLUMN = "column";  private static final String NDCTEXTFILTER = "searchtext";  //--------------------------------------------------------------------------  //   Protected Variables:  //--------------------------------------------------------------------------  //--------------------------------------------------------------------------  //   Private Variables:  //--------------------------------------------------------------------------  private LogBrokerMonitor _monitor = null;  private LogTable _table = null;  //--------------------------------------------------------------------------  //   Constructors:  //--------------------------------------------------------------------------  public ConfigurationManager(LogBrokerMonitor monitor, LogTable table) {    super();    _monitor = monitor;    _table = table;    load();  }  //--------------------------------------------------------------------------  //   Public Methods:  //--------------------------------------------------------------------------  public void save() {    CategoryExplorerModel model = _monitor.getCategoryExplorerTree().getExplorerModel();    CategoryNode root = model.getRootCategoryNode();    StringBuffer xml = new StringBuffer(2048);    openXMLDocument(xml);    openConfigurationXML(xml);    processLogRecordFilter(_monitor.getNDCTextFilter(), xml);    processLogLevels(_monitor.getLogLevelMenuItems(), xml);    processLogLevelColors(_monitor.getLogLevelMenuItems(),        LogLevel.getLogLevelColorMap(), xml);    processLogTableColumns(LogTableColumn.getLogTableColumns(), xml);    processConfigurationNode(root, xml);    closeConfigurationXML(xml);    store(xml.toString());  }  public void reset() {    deleteConfigurationFile();    collapseTree();    selectAllNodes();  }  public static String treePathToString(TreePath path) {    // count begins at one so as to not include the 'Categories' - root category    StringBuffer sb = new StringBuffer();    CategoryNode n = null;    Object[] objects = path.getPath();    for (int i = 1; i < objects.length; i++) {      n = (CategoryNode) objects[i];      if (i > 1) {        sb.append(".");      }      sb.append(n.getTitle());    }    return sb.toString();  }  //--------------------------------------------------------------------------  //   Protected Methods:  //--------------------------------------------------------------------------  protected void load() {    File file = new File(getFilename());    if (file.exists()) {      try {        DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.            newInstance();        DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();        Document doc = docBuilder.parse(file);        processRecordFilter(doc);        processCategories(doc);        processLogLevels(doc);        processLogLevelColors(doc);        processLogTableColumns(doc);      } catch (Exception e) {        // ignore all error and just continue as if there was no        // configuration xml file but do report a message        System.err.println("Unable process configuration file at " +            getFilename() + ". Error Message=" + e.getMessage());      }    }  }  // Added in version 1.2 - reads in the NDC text filter from the  // xml configuration file.  If the value of the filter is not null  // or an empty string ("") then the manager will set the LogBrokerMonitor's  // LogRecordFilter to use the NDC LogRecordFilter.  Otherwise, the  // LogBrokerMonitor will use the default LogRecordFilter.  protected void processRecordFilter(Document doc) {    NodeList nodeList = doc.getElementsByTagName(NDCTEXTFILTER);    // there is only one value stored    Node n = nodeList.item(0);    // add check for backwards compatibility  as this feature was added in    // version 1.2    if (n == null) {      return;    }    NamedNodeMap map = n.getAttributes();    String text = getValue(map, NAME);    if (text == null || text.equals("")) {      return;    }    _monitor.setNDCLogRecordFilter(text);  }  protected void processCategories(Document doc) {    CategoryExplorerTree tree = _monitor.getCategoryExplorerTree();    CategoryExplorerModel model = tree.getExplorerModel();    NodeList nodeList = doc.getElementsByTagName(CATEGORY);    // determine where the starting node is    NamedNodeMap map = nodeList.item(0).getAttributes();    int j = (getValue(map, NAME).equalsIgnoreCase(FIRST_CATEGORY_NAME)) ? 1 : 0;    // iterate backwards throught the nodeList so that expansion of the    // list can occur    for (int i = nodeList.getLength() - 1; i >= j; i--) {      Node n = nodeList.item(i);      map = n.getAttributes();      CategoryNode chnode = model.addCategory(new CategoryPath(getValue(map, PATH)));      chnode.setSelected((getValue(map, SELECTED).equalsIgnoreCase("true")) ? true : false);      if (getValue(map, EXPANDED).equalsIgnoreCase("true")) ;      tree.expandPath(model.getTreePathToRoot(chnode));    }  }  protected void processLogLevels(Document doc) {    NodeList nodeList = doc.getElementsByTagName(LEVEL);    Map menuItems = _monitor.getLogLevelMenuItems();    for (int i = 0; i < nodeList.getLength(); i++) {      Node n = nodeList.item(i);      NamedNodeMap map = n.getAttributes();      String name = getValue(map, NAME);      try {        JCheckBoxMenuItem item =            (JCheckBoxMenuItem) menuItems.get(LogLevel.valueOf(name));        item.setSelected(getValue(map, SELECTED).equalsIgnoreCase("true"));      } catch (LogLevelFormatException e) {        // ignore it will be on by default.      }    }  }  protected void processLogLevelColors(Document doc) {    NodeList nodeList = doc.getElementsByTagName(COLORLEVEL);    LogLevel.getLogLevelColorMap();    for (int i = 0; i < nodeList.getLength(); i++) {      Node n = nodeList.item(i);      // check for backwards compatibility since this feature was added      // in version 1.3

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品乱人伦中文| 国产ts人妖一区二区| 自拍偷拍亚洲综合| 欧美激情一区二区三区四区| 欧美mv和日韩mv国产网站| 欧美另类久久久品| 日韩欧美中文字幕精品| 久久亚区不卡日本| 中文字幕的久久| 亚洲视频一区二区在线| 玉米视频成人免费看| 亚洲精选视频在线| 午夜精品久久久久| 精品一区二区国语对白| 国产主播一区二区| 成人短视频下载| 色婷婷狠狠综合| 欧美人xxxx| xfplay精品久久| 国产精品女同一区二区三区| 亚洲欧美综合在线精品| 亚洲一区二区三区四区的| 午夜婷婷国产麻豆精品| 国产一区二区三区国产| 99热精品国产| 欧美剧情片在线观看| 久久久久久久久免费| 中文在线免费一区三区高中清不卡| 最新国产の精品合集bt伙计| 亚洲第一综合色| 国产精品一二三区在线| 色偷偷成人一区二区三区91| 日韩写真欧美这视频| 亚洲国产高清aⅴ视频| 亚洲日本在线天堂| 男女男精品网站| 91视视频在线观看入口直接观看www | 欧美三片在线视频观看| 欧美精品一区二区不卡| 亚洲精品成人精品456| 蜜臀av一区二区在线观看| eeuss鲁片一区二区三区| 91精品久久久久久蜜臀| 国产精品久久久久久久久久免费看| 性做久久久久久久免费看| 国产一区二区主播在线| 欧美日韩国产经典色站一区二区三区| 久久嫩草精品久久久精品| 亚洲一二三区在线观看| 成人网在线免费视频| 日韩亚洲欧美一区二区三区| 亚洲精品免费视频| 国产主播一区二区三区| 欧美精品一级二级| 亚洲日本一区二区三区| 精品一区二区三区在线观看| 欧美日韩中文字幕一区二区| 日本一区二区三区四区| 韩国三级中文字幕hd久久精品| 日本二三区不卡| 亚洲欧洲成人av每日更新| 国产 日韩 欧美大片| 欧美成人性福生活免费看| 亚洲国产成人av网| 欧美亚洲国产bt| 一区二区在线观看视频在线观看| 国产成人超碰人人澡人人澡| 久久久精品日韩欧美| 六月婷婷色综合| 日韩精品中文字幕一区| 奇米888四色在线精品| 51午夜精品国产| 亚洲成精国产精品女| 欧美日韩国产一区| 天天综合色天天| 欧美一区二区三区四区在线观看| 久久精品久久99精品久久| 欧美日本一道本在线视频| 亚洲一卡二卡三卡四卡无卡久久| 欧美伊人久久大香线蕉综合69| 亚洲精品国产精品乱码不99| 91亚洲精品乱码久久久久久蜜桃| 国产精品午夜在线| 91色porny在线视频| 亚洲制服欧美中文字幕中文字幕| 91色综合久久久久婷婷| 亚洲成人黄色影院| 欧美电影免费提供在线观看| 久久精品久久久精品美女| 久久久精品一品道一区| 99在线视频精品| 一区二区不卡在线播放| 欧美人狂配大交3d怪物一区| 久久精品国内一区二区三区| 欧美精品一区二区三| 成人中文字幕电影| 亚洲国产日日夜夜| 欧美哺乳videos| 国产91精品久久久久久久网曝门| 久久免费的精品国产v∧| 成人av电影在线网| 视频在线在亚洲| 2023国产精品自拍| 色婷婷久久一区二区三区麻豆| 五月婷婷色综合| 久久久久久久av麻豆果冻| 波多野结衣在线aⅴ中文字幕不卡| 亚洲精选视频免费看| 日韩限制级电影在线观看| 国产精品一区二区在线观看不卡| 亚洲人成小说网站色在线 | 久久99精品网久久| 亚洲视频免费在线| 精品免费日韩av| 91免费国产在线观看| 美国十次了思思久久精品导航| 国产精品的网站| 欧美一区二区三区视频在线观看| 99久久综合99久久综合网站| 蜜臀av一区二区在线免费观看| 亚洲欧美偷拍三级| 久久综合九色综合欧美亚洲| 欧美亚洲自拍偷拍| 成年人国产精品| 久久草av在线| 亚洲一区二区三区四区在线观看 | 欧美在线观看一二区| 狠狠色丁香久久婷婷综合_中| 亚洲一区在线电影| 中文字幕免费在线观看视频一区| 日韩一级二级三级精品视频| 色婷婷综合久久久中文字幕| 国产成人精品亚洲日本在线桃色| 日韩精品电影在线观看| 一区二区成人在线观看| 国产精品久久午夜| 久久久国际精品| 欧美r级电影在线观看| 91精品综合久久久久久| 在线观看日韩一区| 色一区在线观看| 色一区在线观看| 成人av在线资源| 成人中文字幕电影| 丰满放荡岳乱妇91ww| 麻豆成人av在线| 日本不卡高清视频| 奇米精品一区二区三区在线观看 | 亚洲欧美激情一区二区| 国产精品欧美极品| 国产婷婷色一区二区三区在线| 日韩美女视频在线| 精品国产sm最大网站免费看| 欧美mv和日韩mv的网站| 精品国产乱码久久久久久久| 日韩视频一区二区在线观看| 欧美一区中文字幕| 欧美成人精品1314www| 欧美不卡123| 国产日韩欧美不卡在线| 国产精品久久夜| 18涩涩午夜精品.www| 国产精品高清亚洲| 亚洲精品视频在线观看免费| 亚洲欧美一区二区三区国产精品| 一区二区三区色| 午夜精品久久久久久久99樱桃| 视频一区国产视频| 免费成人av在线播放| 国产成人综合在线观看| 99精品视频中文字幕| 欧美日韩一级视频| 日韩精品一区二区三区老鸭窝 | 一区二区三区日韩| 香蕉成人伊视频在线观看| 久久激情五月婷婷| 成av人片一区二区| 91精品91久久久中77777| 在线播放中文字幕一区| 337p粉嫩大胆色噜噜噜噜亚洲| 国产精品美女视频| 一区二区三区在线观看国产| 日韩专区欧美专区| 丁香激情综合国产| 欧美老年两性高潮| 国产精品色哟哟网站| 性做久久久久久久久| 久久成人av少妇免费| 91欧美一区二区| 日韩精品综合一本久道在线视频| 欧美国产日产图区| 亚洲欧美日韩一区二区| 久久99国产精品久久99果冻传媒| 99久久精品免费精品国产| 欧美一区二区免费观在线| 亚洲欧美综合另类在线卡通| 免费观看成人鲁鲁鲁鲁鲁视频| 99精品国产一区二区三区不卡| 欧美一区二区三区人| 亚洲乱码中文字幕|