Class DefaultAnalogActionManager
java.lang.Object
jmri.beans.PropertyChangeSupport
jmri.beans.VetoableChangeSupport
jmri.managers.AbstractManager<E>
jmri.jmrit.logixng.implementation.AbstractBaseManager<MaleAnalogActionSocket>
jmri.jmrit.logixng.implementation.DefaultAnalogActionManager
- All Implemented Interfaces:
PropertyChangeListener,VetoableChangeListener,EventListener,PropertyChangeFirer,PropertyChangeProvider,SilenceablePropertyChangeProvider,VetoableChangeFirer,VetoableChangeProvider,AnalogActionManager,BaseManager<MaleAnalogActionSocket>,Manager<MaleAnalogActionSocket>
public class DefaultAnalogActionManager
extends AbstractBaseManager<MaleAnalogActionSocket>
implements AnalogActionManager
Class providing the basic logic of the ActionManager interface.
-
Nested Class Summary
Nested classes/interfaces inherited from interface jmri.Manager
Manager.ManagerDataEvent<E extends NamedBean>, Manager.ManagerDataListener<E extends NamedBean>, Manager.NameValidity -
Field Summary
FieldsFields inherited from class jmri.jmrit.logixng.implementation.AbstractBaseManager
_maleSocketFactoriesFields inherited from class jmri.managers.AbstractManager
_beans, _tsys, _tuser, memo, silenceableProperties, silencedPropertiesFields inherited from class jmri.beans.VetoableChangeSupport
vetoableChangeSupportFields inherited from class jmri.beans.PropertyChangeSupport
propertyChangeSupportFields inherited from interface jmri.Manager
ANALOGIOS, 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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected MaleAnalogActionSocketcastBean(MaleSocket maleSocket) Cast the maleSocket to E This method is needed since SpotBugs @SuppressWarnings("unchecked") does not work for the cast: (E)socket.createFemaleSocket(Base parent, FemaleSocketListener listener, String socketName) protected MaleAnalogActionSocketvoidDelete Action by removing it from the manager.Get a set of classes that implements the DigitalAction interface.Get the user-readable name of the type of NamedBean handled by this manager.getBeanTypeHandled(boolean plural) Get the user-readable name of the type of NamedBean handled by this manager.Get the last item registered in the mananger.Class<? extends MaleSocket>Get the default male socket classGet the class of NamedBean supported by this Manager.intDetermine the order that types should be written when storing panel files.static DefaultAnalogActionManagerinstance()registerAction(AnalogActionBean action) Remember a NamedBean Object created outside the manager.registerBean(MaleAnalogActionSocket maleSocket) Remember a NamedBean Object created outside the manager.charMethods inherited from class jmri.jmrit.logixng.implementation.AbstractBaseManager
deleteBean, deleteBean, deregister, fireVetoableChange, getOuterBean, register, registerMaleSocketFactory, validSystemNameFormatMethods inherited from class jmri.managers.AbstractManager
addDataListener, checkNumeric, createSystemName, dispose, fireDataListenersAdded, fireDataListenersRemoved, fireVetoableChange, getAutoSystemName, getBySystemName, getBySystemName, getByUserName, getKnownBeanProperties, getMemo, getNamedBean, getNamedBeanSet, getObjectCount, getSystemPrefix, handleUserNameUniqueness, makeSystemName, propertyChange, registerSelf, registerUserName, removeDataListener, setDataListenerMute, setPropertyChangesSilenced, updateAutoNumber, vetoableChangeMethods inherited from class jmri.beans.VetoableChangeSupport
addVetoableChangeListener, addVetoableChangeListener, fireVetoableChange, fireVetoableChange, fireVetoableChange, getVetoableChangeListeners, getVetoableChangeListeners, removeVetoableChangeListener, removeVetoableChangeListenerMethods inherited from class jmri.beans.PropertyChangeSupport
addPropertyChangeListener, addPropertyChangeListener, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListenerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface jmri.jmrit.logixng.AnalogActionManager
getAutoSystemName, getSubSystemNamePrefixMethods inherited from interface jmri.jmrit.logixng.BaseManager
deleteBean, registerMaleSocketFactoryMethods inherited from interface jmri.Manager
addDataListener, deleteBean, deregister, dispose, getBySystemName, getByUserName, getEntryToolTip, getKnownBeanProperties, getMemo, getNamedBean, getNamedBeanSet, getObjectCount, getSystemNamePrefix, getSystemPrefix, isValidSystemNameFormat, makeSystemName, makeSystemName, makeSystemName, register, removeDataListener, setDataListenerMute, validateBadCharsInSystemNameFormat, validateIntegerSystemNameFormat, validateNmraAccessorySystemNameFormat, validateSystemNameFormat, validateSystemNameFormat, validateSystemNameFormatOnlyNumeric, validateSystemNamePrefix, validateTrimmedMin1NumberSystemNameFormat, validateTrimmedSystemNameFormat, validateUppercaseTrimmedSystemNameFormat, validSystemNameFormatMethods inherited from interface jmri.beans.PropertyChangeProvider
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListenerMethods inherited from interface jmri.beans.SilenceablePropertyChangeProvider
setPropertyChangesSilencedMethods inherited from interface jmri.beans.VetoableChangeProvider
addVetoableChangeListener, addVetoableChangeListener, getVetoableChangeListeners, getVetoableChangeListeners, removeVetoableChangeListener, removeVetoableChangeListener
-
Field Details
-
_instance
-
-
Constructor Details
-
DefaultAnalogActionManager
public DefaultAnalogActionManager()
-
-
Method Details
-
getMaleSocketClass
Get the default male socket class- Specified by:
getMaleSocketClassin interfaceBaseManager<MaleAnalogActionSocket>- Returns:
- the class
-
createMaleActionSocket
-
getLastRegisteredMaleSocket
Get the last item registered in the mananger.- Specified by:
getLastRegisteredMaleSocketin interfaceBaseManager<MaleAnalogActionSocket>- Returns:
- the last item
-
registerBean
Remember a NamedBean Object created outside the manager.The non-system-specific SignalHeadManagers use this method extensively.
- Specified by:
registerBeanin interfaceBaseManager<MaleAnalogActionSocket>- Overrides:
registerBeanin classAbstractBaseManager<MaleAnalogActionSocket>- Parameters:
maleSocket- the bean- Returns:
- the registered bean with attached male sockets
-
registerAction
public MaleAnalogActionSocket registerAction(@Nonnull AnalogActionBean action) throws IllegalArgumentException Remember a NamedBean Object created outside the manager. This method creates a MaleActionSocket for the action.- Specified by:
registerActionin interfaceAnalogActionManager- Parameters:
action- the bean- Returns:
- the male socket for this action
- Throws:
IllegalArgumentException- if the action has an invalid system name
-
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 interfaceManager<MaleAnalogActionSocket>- Returns:
- write order for this Manager; larger is later.
-
getBeanTypeHandled
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 interfaceManager<MaleAnalogActionSocket>- Returns:
- a string of the bean type that the manager handles, eg Turnout, Sensor etc
-
deleteAnalogAction
Delete Action by removing it from the manager. The Action must first be deactivated so it stops processing.- Specified by:
deleteAnalogActionin interfaceAnalogActionManager- Parameters:
x- the Action to delete
-
typeLetter
- Specified by:
typeLetterin interfaceManager<MaleAnalogActionSocket>- Returns:
- The type letter for a specific implementation
-
createFemaleSocket
public FemaleAnalogActionSocket createFemaleSocket(Base parent, FemaleSocketListener listener, String socketName) - Specified by:
createFemaleSocketin interfaceAnalogActionManager
-
getActionClasses
Description copied from interface:AnalogActionManagerGet a set of classes that implements the DigitalAction interface.- Specified by:
getActionClassesin interfaceAnalogActionManager- Returns:
- a set of entries with category and class
-
getBeanTypeHandled
Get 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 interfaceManager<MaleAnalogActionSocket>- 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
-
instance
-
getNamedBeanClass
Description copied from interface:ManagerGet the class of NamedBean supported by this Manager. This should be the generic class used in the Manager's class declaration.- Specified by:
getNamedBeanClassin interfaceManager<MaleAnalogActionSocket>- Returns:
- the class supported by this Manager.
-
castBean
Description copied from class:AbstractBaseManagerCast the maleSocket to E This method is needed since SpotBugs @SuppressWarnings("unchecked") does not work for the cast: (E)socket.- Specified by:
castBeanin classAbstractBaseManager<MaleAnalogActionSocket>- Parameters:
maleSocket- the maleSocket to cast- Returns:
- the maleSocket as E
-