/* * Jeti, a Java Jabber client, Copyright (C) 2001 E.S. de Boer * * 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 * (at your option) any later version. * * 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 * * For questions, comments etc, * use the website at http://jeti.jabberstudio.org * or mail/IM me at jeti@jabber.org */ package nu.fw.jeti.util; import org.xml.sax.helpers.*; import org.xml.sax.*; import java.util.*; /** * @author E.S. de Boer */ public class PreferencesHandler extends DefaultHandler { private Map preferences; //private Map messages; private StringBuffer text= new StringBuffer(); //private String show = "available"; public PreferencesHandler(Map preferences) { this.preferences = preferences; // this.messages = messages; } public void startElement(String namespaceURI, String sName, // simple name String qName, // qualified name Attributes attrs) { if(qName.equals("plugin")) { String type = attrs.getValue("type"); String name = attrs.getValue("name"); Object[] temp = new Object[6]; temp[0] = name; temp[1] = Boolean.valueOf(attrs.getValue("enabled")); temp[3] = attrs.getValue("transport"); List l = Preferences.getPlugable(type); for (int i=0; i