jmri.managers.configurexml
Class AbstractNamedBeanManagerConfigXML

java.lang.Object
  extended by jmri.configurexml.AbstractXmlAdapter
      extended by jmri.managers.configurexml.AbstractNamedBeanManagerConfigXML
All Implemented Interfaces:
XmlAdapter
Direct Known Subclasses:
AbstractAudioManagerConfigXML, AbstractLightManagerConfigXML, AbstractMemoryManagerConfigXML, AbstractReporterManagerConfigXML, AbstractSensorManagerConfigXML, AbstractSignalHeadManagerXml, AbstractTurnoutManagerConfigXML, AcelaSignalHeadXml, DccSignalHeadXml, DefaultConditionalManagerXml, DefaultLogixManagerXml, DefaultRouteManagerXml, DefaultSignalGroupManagerXml, DefaultSignalMastLogicManagerXml, DefaultSignalMastManagerXml, DoubleTurnoutSignalHeadXml, EcosLocoAddressManagerXml, LayoutBlockManagerXml, LsDecSignalHeadXml, MergSD2SignalHeadXml, SE8cSignalHeadXml, SE8cSignalHeadXml, SectionManagerXml, SerialSignalHeadXml, SingleTurnoutSignalHeadXml, TransitManagerXml, VirtualSignalHeadXml

public abstract class AbstractNamedBeanManagerConfigXML
extends AbstractXmlAdapter

Provides services for configuring NamedBean manager storage.

Not a full abstract implementation by any means, rather this class provides various common service routines to eventual type-specific subclasses.

Since:
2.3.1
Author:
Bob Jacobsen Copyright: Copyright (c) 2009

Constructor Summary
AbstractNamedBeanManagerConfigXML()
           
 
Method Summary
protected  String getSystemName(Element elem)
          Get the system name from an Element defining a NamedBean Before 2.9.6, this was an attribute Starting in 2.9.6, this was stored as both attribute and element Starting in 3.1/2.10.1, this will be just an element
protected  String getUserName(Element elem)
          Get the user name from an Element defining a NamedBean Before 2.9.6, this was an attribute Starting in 2.9.6, this was stored as both attribute and element Starting in 3.1/2.11.1, this will be just an element
protected  String getUserName(List<Element> beanList, int i)
          Get the username attribute from one element of a list of Elements defining NamedBeans
protected  void loadCommon(NamedBean t, Element elem)
          Load common items: comment The username is not loaded, because it had to be provided in the ctor earlier.
protected  void storeCommon(NamedBean t, Element elem)
          Store common items: user name comment
 
Methods inherited from class jmri.configurexml.AbstractXmlAdapter
creationErrorEncountered, getConfigXmlManager, loadDeferred, loadOrder, setConfigXmlManager
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface jmri.configurexml.XmlAdapter
load, load, store
 

Constructor Detail

AbstractNamedBeanManagerConfigXML

public AbstractNamedBeanManagerConfigXML()
Method Detail

storeCommon

protected void storeCommon(NamedBean t,
                           Element elem)
Store common items:

Parameters:
t - The NamedBean being stored
elem - The JDOM element for storing the NamedBean

loadCommon

protected void loadCommon(NamedBean t,
                          Element elem)
Load common items: The username is not loaded, because it had to be provided in the ctor earlier.

Parameters:
t - The NamedBean being loaded
elem - The JDOM element containing the NamedBean

getUserName

protected String getUserName(List<Element> beanList,
                             int i)
Get the username attribute from one element of a list of Elements defining NamedBeans

Parameters:
beanList - List, where each entry is an Element
i - index of Element in list to examine

getUserName

protected String getUserName(Element elem)
Get the user name from an Element defining a NamedBean

Parameters:
elem - The existing Element

getSystemName

protected String getSystemName(Element elem)
Get the system name from an Element defining a NamedBean

Parameters:
elem - The existing Element


Copyright © 1997 - 2011 JMRI Community.
JMRI, DecoderPro, PanelPro, SoundPro, DispatcherPro and associated logos are our trademarks.

Additional information on copyright, trademarks and licenses is linked here.
Site hosted by: Get JMRI Model Railroad Interface at SourceForge.net. Fast, secure and Free Open Source software downloads