Package jmri.managers
Class DefaultLogixManager
- java.lang.Object
- 
- jmri.beans.PropertyChangeSupport
- 
- jmri.beans.VetoableChangeSupport
- 
- jmri.managers.AbstractManager<Logix>
- 
- jmri.managers.DefaultLogixManager
 
 
 
 
- 
- All Implemented Interfaces:
- java.beans.PropertyChangeListener,- java.beans.VetoableChangeListener,- java.util.EventListener,- PropertyChangeFirer,- PropertyChangeProvider,- SilenceablePropertyChangeProvider,- VetoableChangeFirer,- VetoableChangeProvider,- LogixManager,- Manager<Logix>
 
 public class DefaultLogixManager extends AbstractManager<Logix> implements LogixManager Basic Implementation of a LogixManager.Note that Logix system names must begin with system prefix and type character, usually IX, and be followed by a string, usually, but not always, a number. This is enforced when a Logix is created. The system names of Conditionals belonging to a Logix begin with the Logix's system name, then there is a capital C and a number. 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from interface jmri.ManagerManager.ManagerDataEvent<E extends NamedBean>, Manager.ManagerDataListener<E extends NamedBean>, Manager.NameValidity
 
- 
 - 
Field SummaryFields Modifier and Type Field Description (package private) booleanloadDisabledSupport for loading Logixs in a disabled state to debug loops- 
Fields inherited from class jmri.managers.AbstractManager_beans, _tsys, _tuser, lastAutoNamedBeanRef, memo, paddedNumber, silenceableProperties, silencedProperties
 - 
Fields inherited from class jmri.beans.VetoableChangeSupportvetoableChangeSupport
 - 
Fields inherited from class jmri.beans.PropertyChangeSupportpropertyChangeSupport
 - 
Fields inherited from interface jmri.ManagerANALOGIOS, AUDIO, BLOCKBOSS, BLOCKS, CONDITIONALS, CTCDATA, ENTRYEXIT, IDTAGS, LAYOUTBLOCKS, LIGHTS, LOGIXNG_ANALOG_ACTIONS, LOGIXNG_ANALOG_EXPRESSIONS, LOGIXNG_CONDITIONALNGS, LOGIXNG_DIGITAL_ACTIONS, LOGIXNG_DIGITAL_BOOLEAN_ACTIONS, LOGIXNG_DIGITAL_EXPRESSIONS, LOGIXNG_GLOBAL_VARIABLES, LOGIXNG_MODULES, LOGIXNG_STRING_ACTIONS, LOGIXNG_STRING_EXPRESSIONS, LOGIXNG_TABLES, LOGIXNGS, LOGIXS, MEMORIES, METERFRAMES, METERS, OBLOCKS, PANELFILES, PROPERTY_BEANS, PROPERTY_CAN_DELETE, PROPERTY_DISPLAY_LIST_NAME, PROPERTY_DO_DELETE, PROPERTY_DO_NOT_DELETE, PROPERTY_LENGTH, REPORTERS, ROUTES, SECTIONS, SENSORGROUPS, SENSORS, SIGNALGROUPS, SIGNALHEADS, SIGNALMASTLOGICS, SIGNALMASTS, STRINGIOS, TIMEBASE, TRANSITS, TURNOUTS, WARRANTS
 
- 
 - 
Constructor SummaryConstructors Constructor Description DefaultLogixManager(InternalSystemConnectionMemo memo)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactivateAllLogixs()Activate all Logixs that are not currently active This method is called after a configuration file is loaded.LogixcreateNewLogix(java.lang.String userName)For use with User GUI, to allow the auto generation of systemNames, where the user can optionally supply a username.LogixcreateNewLogix(java.lang.String systemName, java.lang.String userName)Create a new Logix if the Logix does not exist.voiddeleteLogix(Logix x)Remove an existing Logix and delete all its conditionals.java.lang.StringgetBeanTypeHandled(boolean plural)Get the user-readable name of the type of NamedBean handled by this manager.LogixgetLogix(java.lang.String name)Get an existing Logix.java.lang.Class<Logix>getNamedBeanClass()Get the class of NamedBean supported by this Manager.intgetXMLOrder()Determine the order that types should be written when storing panel files.voidsetLoadDisabled(boolean s)Support for loading Logixs in a disabled state to debug loopschartypeLetter()- 
Methods inherited from class jmri.managers.AbstractManageraddDataListener, checkNumeric, createSystemName, deleteBean, deregister, dispose, fireDataListenersAdded, fireDataListenersRemoved, fireVetoableChange, getAutoSystemName, getBySystemName, getBySystemName, getByUserName, getKnownBeanProperties, getMemo, getNamedBean, getNamedBeanSet, getObjectCount, getOuterBean, getSystemPrefix, handleUserNameUniqueness, makeSystemName, propertyChange, register, registerSelf, registerUserName, removeDataListener, setDataListenerMute, setPropertyChangesSilenced, setRegisterSelf, updateAutoNumber, validSystemNameFormat, vetoableChange
 - 
Methods inherited from class jmri.beans.VetoableChangeSupportaddVetoableChangeListener, addVetoableChangeListener, fireVetoableChange, fireVetoableChange, fireVetoableChange, getVetoableChangeListeners, getVetoableChangeListeners, removeVetoableChangeListener, removeVetoableChangeListener
 - 
Methods inherited from class jmri.beans.PropertyChangeSupportaddPropertyChangeListener, addPropertyChangeListener, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface jmri.LogixManagergetBySystemName, getByUserName
 - 
Methods inherited from interface jmri.ManageraddDataListener, deleteBean, deregister, dispose, getBeanTypeHandled, getEntryToolTip, getKnownBeanProperties, getMemo, getNamedBean, getNamedBeanSet, getObjectCount, getSubSystemNamePrefix, getSystemNamePrefix, getSystemPrefix, isValidSystemNameFormat, makeSystemName, makeSystemName, makeSystemName, register, removeDataListener, setDataListenerMute, validateBadCharsInSystemNameFormat, validateIntegerSystemNameFormat, validateNmraAccessorySystemNameFormat, validateSystemNameFormat, validateSystemNameFormat, validateSystemNameFormatOnlyNumeric, validateSystemNamePrefix, validateTrimmedMin1NumberSystemNameFormat, validateTrimmedSystemNameFormat, validateUppercaseTrimmedSystemNameFormat, validSystemNameFormat
 - 
Methods inherited from interface jmri.beans.PropertyChangeProvideraddPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
 - 
Methods inherited from interface jmri.beans.SilenceablePropertyChangeProvidersetPropertyChangesSilenced
 - 
Methods inherited from interface jmri.beans.VetoableChangeProvideraddVetoableChangeListener, addVetoableChangeListener, getVetoableChangeListeners, getVetoableChangeListeners, removeVetoableChangeListener, removeVetoableChangeListener
 
- 
 
- 
- 
- 
Field Detail- 
loadDisabledboolean loadDisabled Support for loading Logixs in a disabled state to debug loops
 
- 
 - 
Constructor Detail- 
DefaultLogixManagerpublic DefaultLogixManager(InternalSystemConnectionMemo memo) 
 
- 
 - 
Method Detail- 
getXMLOrderpublic int getXMLOrder() Description copied from interface:ManagerDetermine the order that types should be written when storing panel files. Uses one of the constants defined in this class.Yes, that's an overly-centralized methodology, but it works for now. - Specified by:
- getXMLOrderin interface- Manager<Logix>
- Returns:
- write order for this Manager; larger is later.
 
 - 
typeLetterpublic char typeLetter() - Specified by:
- typeLetterin interface- Manager<Logix>
- Returns:
- The type letter for a specific implementation
 
 - 
createNewLogixpublic Logix createNewLogix(java.lang.String systemName, java.lang.String userName) Create a new Logix if the Logix does not exist.- Specified by:
- createNewLogixin interface- LogixManager
- Parameters:
- systemName- the system name
- userName- the user name
- Returns:
- null if a Logix with the same systemName or userName already exists, or if there is trouble creating a new Logix
 
 - 
createNewLogixpublic Logix createNewLogix(java.lang.String userName) Description copied from interface:LogixManagerFor use with User GUI, to allow the auto generation of systemNames, where the user can optionally supply a username.- Specified by:
- createNewLogixin interface- LogixManager
- Parameters:
- userName- the user name
- Returns:
- a new Logix or null if unable to create
 
 - 
deleteLogixpublic void deleteLogix(Logix x) Remove an existing Logix and delete all its conditionals. Logix must have been deactivated before invoking this.- Specified by:
- deleteLogixin interface- LogixManager
- Parameters:
- x- the Logix to delete
 
 - 
activateAllLogixspublic void activateAllLogixs() Activate all Logixs that are not currently active This method is called after a configuration file is loaded.- Specified by:
- activateAllLogixsin interface- LogixManager
 
 - 
getLogixpublic Logix getLogix(java.lang.String name) Get an existing Logix. First looks up assuming name is a User Name. If this fails looks up assuming name is a System Name. If both fail, returns null.- Specified by:
- getLogixin interface- LogixManager
- Parameters:
- name- User name or system name to match
- Returns:
- null if no match found
 
 - 
setLoadDisabledpublic void setLoadDisabled(boolean s) Description copied from interface:LogixManagerSupport for loading Logixs in a disabled state to debug loops- Specified by:
- setLoadDisabledin interface- LogixManager
- Parameters:
- s- true if Logix should be loadable while disabled
 
 - 
getBeanTypeHandled@Nonnull public java.lang.String getBeanTypeHandled(boolean plural) Description copied from interface:ManagerGet the user-readable name of the type of NamedBean handled by this manager.For instance, in the code where we are dealing with just a bean and a message that needs to be passed to the user or in a log. - Specified by:
- getBeanTypeHandledin interface- Manager<Logix>
- Parameters:
- plural- true to return plural form of the type; false to return singular form
- Returns:
- a string of the bean type that the manager handles, eg Turnout, Sensor etc
 
 - 
getNamedBeanClasspublic java.lang.Class<Logix> getNamedBeanClass() Get the class of NamedBean supported by this Manager. This should be the generic class used in the Manager's class declaration.- Specified by:
- getNamedBeanClassin interface- Manager<Logix>
- Returns:
- the class supported by this Manager.
 
 
- 
 
-