001package jmri.jmrix.ecos.configurexml;
002
003import jmri.ConfigureManager;
004import org.jdom2.Element;
005
006/**
007 * This class is here to prevent error messages being presented to the user on
008 * opening JMRI or saving the panel file, when connected to an Ecos. It
009 * currently serves no other function. The ecos preferences are stored under the
010 * connection configuration
011 *
012 * @author Kevin Dickerson Copyright: Copyright (c) 2009
013 */
014public class EcosPreferencesXml extends jmri.configurexml.AbstractXmlAdapter /*extends jmri.managers.configurexml.AbstractTurnoutManagerConfigXML*/ {
015
016    public EcosPreferencesXml() {
017        super();
018    }
019
020    @Override
021    public Element store(Object o) {
022        return null;
023    }
024
025    protected void register() {
026        //log.error("unexpected call to register()", new Exception());
027        ConfigureManager cm = jmri.InstanceManager.getNullableDefault(jmri.ConfigureManager.class);
028        if (cm != null) {
029            cm.registerPref(this);
030        }
031    }
032    /*protected void register(String host, String port, String mode) {
033     InstanceManager.getNullableDefault(jmri.ConfigureManager.class).registerPref(new ConnectionConfig(host, port, mode));
034     }*/
035
036    @Override
037    public boolean load(Element shared, Element perNode) {
038        return true;
039    }
040
041//    private final static Logger log = LoggerFactory.getLogger(EcosPreferencesXml.class);
042}