001package jmri.jmrix.jmriclient.configurexml;
002
003import org.jdom2.Element;
004import org.slf4j.Logger;
005import org.slf4j.LoggerFactory;
006
007/**
008 * Provides load and store functionality for configuring
009 * JMRIClientLightManagers.
010 * <p>
011 * Uses the store method from the abstract base class, but provides a load
012 * method here.
013 *
014 * @author Bob Jacobsen Copyright: Copyright (c) 2008
015 */
016public class JMRIClientLightManagerXml extends jmri.managers.configurexml.AbstractLightManagerConfigXML {
017
018    public JMRIClientLightManagerXml() {
019        super();
020    }
021
022    @Override
023    public void setStoreElementClass(Element lights) {
024        lights.setAttribute("class", "jmri.jmrix.jmriclient.configurexml.JMRIClientLightManagerXml");
025    }
026
027    @Override
028    public void load(Element element, Object o) {
029        log.error("Invalid method called");
030    }
031
032    @Override
033    public boolean load(Element shared, Element perNode) {
034        // load individual lights
035        return loadLights(shared);
036    }
037
038    // initialize logging
039    private final static Logger log = LoggerFactory.getLogger(JMRIClientLightManagerXml.class);
040}