001package jmri.jmrix.can.cbus.configurexml;
002
003import jmri.managers.configurexml.AbstractReporterManagerConfigXML;
004import org.jdom2.Element;
005import org.slf4j.Logger;
006import org.slf4j.LoggerFactory;
007
008/**
009 * Provides load and store functionality for configuring CbusReporterManagers.
010 * <p>
011 * Uses the store method from the abstract base class, but provides a load
012 * method here.
013 * <hr>
014 * This file is part of JMRI.
015 * <p>
016 * JMRI is free software; you can redistribute it and/or modify it under the
017 * terms of version 2 of the GNU General Public License as published by the Free
018 * Software Foundation. See the "COPYING" file for a copy of this license.
019 * <p>
020 * JMRI is distributed in the hope that it will be useful, but WITHOUT ANY
021 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
022 * A PARTICULAR PURPOSE. See the GNU General Public License for more details.
023 *
024 * @author Mark Riddoch Copyright: Copyright (C) 2015
025 * @since 2.3.1
026 */
027public class CbusReporterManagerXml extends AbstractReporterManagerConfigXML {
028
029    public CbusReporterManagerXml() {
030        super();
031    }
032
033    /**
034     * {@inheritDoc}
035     */
036    @Override
037    public void setStoreElementClass(Element reporters) {
038        reporters.setAttribute("class", this.getClass().getName());
039    }
040
041    /**
042     * {@inheritDoc}
043     */
044    @Override
045    public void load(Element element, Object o) {
046        log.error("Invalid method called");
047    }
048
049    /**
050     * {@inheritDoc}
051     */
052    @Override
053    public boolean load(Element shared, Element perNode) {
054        // load individual reporters
055        return loadReporters(shared);
056    }
057
058    private static final Logger log = LoggerFactory.getLogger(CbusReporterManagerXml.class);
059}