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