Package jmri
Interface SignalGroupManager
-
- All Superinterfaces:
Manager<SignalGroup>
,PropertyChangeProvider
,SilenceablePropertyChangeProvider
,VetoableChangeProvider
- All Known Implementing Classes:
DefaultSignalGroupManager
public interface SignalGroupManager extends Manager<SignalGroup>
Interface for obtaining information about signal groups.Each NamedBean here represents a single signal group. The actual objects are SignalGroupTable objects; that's a current anachronism.
See the common implementation for information on how loaded, etc.
This file is part of JMRI.
-
-
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
-
Fields 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, REPORTERS, ROUTES, SECTIONS, SENSORGROUPS, SENSORS, SIGNALGROUPS, SIGNALHEADS, SIGNALMASTLOGICS, SIGNALMASTS, STRINGIOS, TIMEBASE, TRANSITS, TURNOUTS, WARRANTS
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
deleteSignalGroup(SignalGroup s)
Delete Group by removing it from the manager.SignalGroup
getBySystemName(java.lang.String name)
Locate an existing instance based on a system name.SignalGroup
getByUserName(java.lang.String name)
Locate an existing instance based on a user name.SignalGroup
getSignalGroup(java.lang.String name)
Locate via user name, then system name if needed.SignalGroup
newSignalGroupWithUserName(java.lang.String userName)
Create a new Signal group if the group does not exist.SignalGroup
provideSignalGroup(java.lang.String systemName, java.lang.String userName)
Create a new SignalGroup if the group does not exist.-
Methods inherited from interface jmri.Manager
addDataListener, deleteBean, deregister, dispose, getBeanTypeHandled, getBeanTypeHandled, getEntryToolTip, getKnownBeanProperties, getMemo, getNamedBean, getNamedBeanClass, getNamedBeanSet, getObjectCount, getSubSystemNamePrefix, getSystemNamePrefix, getSystemPrefix, getXMLOrder, isValidSystemNameFormat, makeSystemName, makeSystemName, makeSystemName, register, removeDataListener, setDataListenerMute, typeLetter, validateBadCharsInSystemNameFormat, validateIntegerSystemNameFormat, validateNmraAccessorySystemNameFormat, validateSystemNameFormat, validateSystemNameFormat, validateSystemNameFormatOnlyNumeric, validateSystemNamePrefix, validateTrimmedMin1NumberSystemNameFormat, validateTrimmedSystemNameFormat, validateUppercaseTrimmedSystemNameFormat, validSystemNameFormat
-
Methods inherited from interface jmri.beans.PropertyChangeProvider
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
Methods inherited from interface jmri.beans.SilenceablePropertyChangeProvider
setPropertyChangesSilenced
-
Methods inherited from interface jmri.beans.VetoableChangeProvider
addVetoableChangeListener, addVetoableChangeListener, getVetoableChangeListeners, getVetoableChangeListeners, removeVetoableChangeListener, removeVetoableChangeListener
-
-
-
-
Method Detail
-
getSignalGroup
@CheckForNull SignalGroup getSignalGroup(@Nonnull java.lang.String name)
Locate via user name, then system name if needed.Does not create a new one if nothing found
- Parameters:
name
- User Name or System Name to match- Returns:
- null if no match found
-
getBySystemName
@CheckForNull SignalGroup getBySystemName(@Nonnull java.lang.String name)
Locate an existing instance based on a system name.- Specified by:
getBySystemName
in interfaceManager<SignalGroup>
- Parameters:
name
- System Name of the required NamedBean- Returns:
- requested NamedBean object or null if none exists
-
getByUserName
@CheckForNull SignalGroup getByUserName(@Nonnull java.lang.String name)
Locate an existing instance based on a user name.- Specified by:
getByUserName
in interfaceManager<SignalGroup>
- Parameters:
name
- System Name of the required NamedBean- Returns:
- requested NamedBean object or null if none exists
-
newSignalGroupWithUserName
@Nonnull SignalGroup newSignalGroupWithUserName(@Nonnull java.lang.String userName) throws java.lang.IllegalArgumentException
Create a new Signal group if the group does not exist.Intended for use with User GUI, to allow the auto generation of systemNames, where the user can optionally supply a username.
- Parameters:
userName
- User name for the new group- Returns:
- a Signal Group with the same userName if already exists
- Throws:
java.lang.IllegalArgumentException
- if there is trouble creating a new Group
-
provideSignalGroup
@Nonnull SignalGroup provideSignalGroup(@Nonnull java.lang.String systemName, java.lang.String userName) throws java.lang.IllegalArgumentException
Create a new SignalGroup if the group does not exist.- Parameters:
systemName
- the system name for the groupuserName
- the user name for the group- Returns:
- a Signal Group with the same systemName or userName if already exists or
- Throws:
java.lang.IllegalArgumentException
- if there is trouble creating a new Group.
-
deleteSignalGroup
void deleteSignalGroup(@Nonnull SignalGroup s)
Delete Group by removing it from the manager. The Group must first be deactivated so it stops processing.- Parameters:
s
- the group to remove
-
-