Package jmri.jmrit.audio.configurexml
Class DefaultAudioManagerXml
java.lang.Object
jmri.configurexml.AbstractXmlAdapter
jmri.managers.configurexml.AbstractNamedBeanManagerConfigXML
jmri.managers.configurexml.AbstractAudioManagerConfigXML
jmri.jmrit.audio.configurexml.DefaultAudioManagerXml
- All Implemented Interfaces:
XmlAdapter
Persistency implementation for the default AudioManager persistence.
This file is part of JMRI.
The state of audio objects is not persisted, just their existence.
This file is part of JMRI.
JMRI is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. See the "COPYING" file for a copy of this license.
JMRI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-
Nested Class Summary
Nested classes/interfaces inherited from class jmri.configurexml.AbstractXmlAdapter
AbstractXmlAdapter.EnumIO<T extends Enum<T>>, AbstractXmlAdapter.EnumIoMapped<T extends Enum<T>>, AbstractXmlAdapter.EnumIoNames<T extends Enum<T>>, AbstractXmlAdapter.EnumIoNamesNumbers<T extends Enum<T>>, AbstractXmlAdapter.EnumIoOrdinals<T extends Enum<T>> -
Field Summary
Fields inherited from class jmri.configurexml.AbstractXmlAdapter
STR_FALSE, STR_NO, STR_TRUE, STR_YES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanload(org.jdom2.Element shared, org.jdom2.Element perNode) Create a AudioManager object of the correct class, then register and fill it.voidsetStoreElementClass(org.jdom2.Element audio) Subclass provides implementation to create the correct top element, including the type information.Methods inherited from class jmri.managers.configurexml.AbstractAudioManagerConfigXML
loadAudio, loadOrder, storeMethods inherited from class jmri.managers.configurexml.AbstractNamedBeanManagerConfigXML
checkedNamedBeanHandle, checkedNamedBeanName, checkedNamedBeanReference, getSystemName, getUserName, getUserName, loadCommon, storeCommonMethods inherited from class jmri.configurexml.AbstractXmlAdapter
getAttributeBooleanValue, getAttributeDoubleValue, getAttributeFloatValue, getAttributeIntegerValue, getExceptionHandler, handleException, load, load, load, loadDeferred, setExceptionHandler, store
-
Constructor Details
-
DefaultAudioManagerXml
public DefaultAudioManagerXml()Default constructor
-
-
Method Details
-
setStoreElementClass
Subclass provides implementation to create the correct top element, including the type information. Default implementation is to use the local class here.- Specified by:
setStoreElementClassin classAbstractAudioManagerConfigXML- Parameters:
audio- The top-level element being created
-
load
Create a AudioManager object of the correct class, then register and fill it.- Specified by:
loadin interfaceXmlAdapter- Overrides:
loadin classAbstractXmlAdapter- Parameters:
shared- Top level Element to unpack.perNode- Per-node top level Element to unpack.- Returns:
- true if successful
-