Interface SectionManager
-
- All Superinterfaces:
Manager<Section>
,PropertyChangeProvider
,SilenceablePropertyChangeProvider
,VetoableChangeProvider
- All Known Implementing Classes:
DefaultSectionManager
public interface SectionManager extends Manager<Section>
Basic Implementation of a SectionManager.This doesn't have a "new" interface, since Sections are independently implemented, instead of being system-specific.
Note that Section system names must begin with system prefix and type character, usually IY, and be followed by a string, usually, but not always, a number. This is enforced when a Section is created.
This file is part of JMRI.JMRI is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. See the "COPYING" file for a copy of this license.
JMRI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-
-
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 Section
createNewSection(java.lang.String userName)
Create a New Section with Auto System Name.Section
createNewSection(java.lang.String systemName, java.lang.String userName)
Create a new Section if the Section does not exist.void
deleteSection(Section y)
Remove an existing Section.void
generateBlockSections()
Generate Block Sections in stubs/sidings.Section
getSection(java.lang.String name)
Get an existing Section.void
initializeBlockingSensors()
Initialize all blocking sensors that exist - set them to 'ACTIVE'.int
removeDirectionSensorsFromSSL()
Remove direction sensors from SSL for all signals.int
setupDirectionSensors()
Check direction sensors in SSL for signals.int
validateAllSections()
Validate all Sections.-
Methods inherited from interface jmri.Manager
addDataListener, deleteBean, deregister, dispose, getBeanTypeHandled, getBeanTypeHandled, getBySystemName, getByUserName, 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
-
createNewSection
@Nonnull Section createNewSection(@Nonnull java.lang.String systemName, java.lang.String userName) throws java.lang.IllegalArgumentException
Create a new Section if the Section does not exist.- Parameters:
systemName
- the desired system nameuserName
- the desired user name- Returns:
- a new Section or
- Throws:
java.lang.IllegalArgumentException
- if a Section with the same systemName or userName already exists, or if there is trouble creating a new Section.
-
createNewSection
@Nonnull Section createNewSection(java.lang.String userName) throws java.lang.IllegalArgumentException
Create a New Section with Auto System Name.- Parameters:
userName
- UserName for new Section- Returns:
- new Section with Auto System Name.
- Throws:
java.lang.IllegalArgumentException
- if existing Section, or unable to create a new Section.
-
deleteSection
void deleteSection(Section y)
Remove an existing Section.- Parameters:
y
- the section to remove
-
getSection
Section getSection(java.lang.String name)
Get an existing Section. First look up assuming that name is a User Name. If this fails look up assuming that name is a System Name.- Parameters:
name
- the name to find; user names are searched for a match first, followed by system names- Returns:
- the found section of null if no matching Section found
-
validateAllSections
int validateAllSections()
Validate all Sections.- Returns:
- number or validation errors; -2 is returned if there are no sections
-
setupDirectionSensors
int setupDirectionSensors()
Check direction sensors in SSL for signals.- Returns:
- the number or errors; 0 if no errors; -1 if the panel is null; -2 if there are no sections
-
removeDirectionSensorsFromSSL
int removeDirectionSensorsFromSSL()
Remove direction sensors from SSL for all signals.- Returns:
- the number or errors; 0 if no errors; -1 if the panel is null; -2 if there are no sections
-
initializeBlockingSensors
void initializeBlockingSensors()
Initialize all blocking sensors that exist - set them to 'ACTIVE'.
-
generateBlockSections
void generateBlockSections()
Generate Block Sections in stubs/sidings. Called after generating signal logic.
-
-