jmri.managers.configurexml
Class AbstractNamedBeanManagerConfigXML

Show UML class diagram
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, DccSignalMastXml, DefaultConditionalManagerXml, DefaultLogixManagerXml, DefaultRouteManagerXml, DefaultSignalGroupManagerXml, DefaultSignalMastLogicManagerXml, DefaultSignalMastManagerXml, DoubleTurnoutSignalHeadXml, EcosLocoAddressManagerXml, LayoutBlockManagerXml, LsDecSignalHeadXml, MergSD2SignalHeadXml, SE8cSignalHeadXml, SE8cSignalHeadXml, SectionManagerXml, SerialSignalHeadXml, SignalHeadSignalMastXml, SingleTurnoutSignalHeadXml, TransitManagerXml, TurnoutSignalMastXml, VirtualSignalHeadXml, VirtualSignalMastXml

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

Field Summary
(package private) static org.slf4j.Logger log
           
 
Constructor Summary
AbstractNamedBeanManagerConfigXML()
           
 
Method Summary
(package private)  boolean getAttributeBool(org.jdom.Element elem, String name, boolean def)
          Convenience method to get a boolean value from an Attribute in an Element defining a NamedBean
(package private)  String getAttributeString(org.jdom.Element elem, String name)
          Convenience method to get a String value from an Attribute in an Element defining a NamedBean
protected  String getSystemName(org.jdom.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(org.jdom.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<org.jdom.Element> beanList, int i)
          Get the username attribute from one element of a list of Elements defining NamedBeans
(package private)  void loadComment(NamedBean t, org.jdom.Element elem)
          Load the comment attribute into a NamedBean from an Element defining a NamedBean
(package private)  void loadComment(NamedBean t, List<org.jdom.Element> beanList, int i)
          Load the comment attribute into a NamedBean from one element of a list of Elements defining NamedBeans
protected  void loadCommon(NamedBean t, org.jdom.Element elem)
          Load common items: comment The username is not loaded, because it had to be provided in the ctor earlier.
(package private)  void loadProperties(NamedBean t, org.jdom.Element elem)
          Load all key/value properties
(package private)  void storeComment(NamedBean t, org.jdom.Element elem)
          Store the comment parameter from a NamedBean
protected  void storeCommon(NamedBean t, org.jdom.Element elem)
          Store common items: user name comment
(package private)  void storeProperties(NamedBean t, org.jdom.Element elem)
          Store all key/value properties
(package private)  void storeUserName(NamedBean t, org.jdom.Element elem)
          Store the username parameter from a NamedBean.
 
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
 

Field Detail

log

static org.slf4j.Logger log
Constructor Detail

AbstractNamedBeanManagerConfigXML

public AbstractNamedBeanManagerConfigXML()
Method Detail

storeCommon

protected void storeCommon(NamedBean t,
                           org.jdom.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,
                          org.jdom.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

storeComment

void storeComment(NamedBean t,
                  org.jdom.Element elem)
Store the comment parameter from a NamedBean

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

storeUserName

void storeUserName(NamedBean t,
                   org.jdom.Element elem)
Store the username parameter from a NamedBean.

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

getUserName

protected String getUserName(List<org.jdom.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(org.jdom.Element elem)
Get the user name from an Element defining a NamedBean

Parameters:
elem - The existing Element

getSystemName

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

Parameters:
elem - The existing Element

loadComment

void loadComment(NamedBean t,
                 List<org.jdom.Element> beanList,
                 int i)
Load the comment attribute into a NamedBean from one element of a list of Elements defining NamedBeans

Parameters:
t - The NamedBean being loaded
beanList - List, where each entry is an Element
i - index of Element in list to examine

loadComment

void loadComment(NamedBean t,
                 org.jdom.Element elem)
Load the comment attribute into a NamedBean from an Element defining a NamedBean

Parameters:
t - The NamedBean being loaded
elem - The existing Element

getAttributeString

String getAttributeString(org.jdom.Element elem,
                          String name)
Convenience method to get a String value from an Attribute in an Element defining a NamedBean

Parameters:
elem - The existing Element
name - name of desired Attribute

getAttributeBool

boolean getAttributeBool(org.jdom.Element elem,
                         String name,
                         boolean def)
Convenience method to get a boolean value from an Attribute in an Element defining a NamedBean

Parameters:
elem - The existing Element
name - Name of desired Attribute
def - Default value for attribute

storeProperties

void storeProperties(NamedBean t,
                     org.jdom.Element elem)
Store all key/value properties

Parameters:
t - The NamedBean being loaded
elem - The existing Element

loadProperties

void loadProperties(NamedBean t,
                    org.jdom.Element elem)
Load all key/value properties

Parameters:
t - The NamedBean being loaded
elem - The existing Element


Copyright © 1997-2013 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