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
public class DefaultAudioManagerXml extends AbstractAudioManagerConfigXML
Persistency implementation for the default AudioManager persistence.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 java.lang.Enum<T>>, AbstractXmlAdapter.EnumIoMapped<T extends java.lang.Enum<T>>, AbstractXmlAdapter.EnumIoNames<T extends java.lang.Enum<T>>, AbstractXmlAdapter.EnumIoNamesNumbers<T extends java.lang.Enum<T>>, AbstractXmlAdapter.EnumIoOrdinals<T extends java.lang.Enum<T>>
-
-
Constructor Summary
Constructors Constructor Description DefaultAudioManagerXml()
Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
load(org.jdom2.Element shared, org.jdom2.Element perNode)
Create a AudioManager object of the correct class, then register and fill it.void
setStoreElementClass(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, store
-
Methods inherited from class jmri.managers.configurexml.AbstractNamedBeanManagerConfigXML
checkedNamedBeanHandle, checkedNamedBeanName, checkedNamedBeanReference, getSystemName, getUserName, getUserName, loadCommon, storeCommon
-
Methods inherited from class jmri.configurexml.AbstractXmlAdapter
getAttributeBooleanValue, getAttributeDoubleValue, getAttributeFloatValue, getAttributeIntegerValue, getExceptionHandler, handleException, load, load, load, loadDeferred, setExceptionHandler, store
-
-
-
-
Constructor Detail
-
DefaultAudioManagerXml
public DefaultAudioManagerXml()
Default constructor
-
-
Method Detail
-
setStoreElementClass
public void setStoreElementClass(org.jdom2.Element audio)
Subclass provides implementation to create the correct top element, including the type information. Default implementation is to use the local class here.- Specified by:
setStoreElementClass
in classAbstractAudioManagerConfigXML
- Parameters:
audio
- The top-level element being created
-
load
public boolean load(org.jdom2.Element shared, org.jdom2.Element perNode)
Create a AudioManager object of the correct class, then register and fill it.- Specified by:
load
in interfaceXmlAdapter
- Overrides:
load
in classAbstractXmlAdapter
- Parameters:
shared
- Top level Element to unpack.perNode
- Per-node top level Element to unpack.- Returns:
- true if successful
-
-