001package jmri.jmrix.anyma.configurexml; 002 003import javax.annotation.Nonnull; 004import jmri.managers.configurexml.AbstractLightManagerConfigXML; 005import org.jdom2.Element; 006import org.slf4j.Logger; 007import org.slf4j.LoggerFactory; 008 009/** 010 * Provides load and store functionality for configuring AnymaDMX_LightManagers. 011 * <p> 012 * Uses the store method from the abstract base class, but provides a load 013 * method here. 014 * 015 * @author George Warner Copyright (c) 2017-2018 016 * @since 4.9.6 017 */ 018public class UsbLightManagerXml extends AbstractLightManagerConfigXML { 019 020 /** 021 * constructor 022 */ 023 public UsbLightManagerXml() { 024 super(); 025 log.debug("* AnymaDMX_LightManagerXml constructor called"); 026 } 027 028 /** 029 * {@inheritDoc} 030 */ 031 @Override 032 public void setStoreElementClass(@Nonnull Element lights) { 033 log.debug("* AnymaDMX_LightManagerXml.setStoreElementClass() called"); 034 lights.setAttribute("class", this.getClass().getName()); 035 } 036 037 /** 038 * {@inheritDoc} 039 */ 040 @Override 041 public boolean load(@Nonnull Element shared, @Nonnull Element perNode) { 042 log.debug("* AnymaDMX_LightManagerXml.load() called"); 043 // load individual lights 044 return loadLights(shared); 045 } 046 047 private final static Logger log = LoggerFactory.getLogger(UsbLightManagerXml.class); 048}