Package jmri
Interface ConditionalManager
- 
- All Superinterfaces:
- Manager<Conditional>,- PropertyChangeProvider,- SilenceablePropertyChangeProvider,- VetoableChangeProvider
 - All Known Implementing Classes:
- DefaultConditionalManager
 
 public interface ConditionalManager extends Manager<Conditional> Interface for obtaining ConditionalsThis doesn't have a "new" method, since Conditionals are separately implemented, instead of being system-specific. 
 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.ManagerManager.ManagerDataEvent<E extends NamedBean>, Manager.ManagerDataListener<E extends NamedBean>, Manager.NameValidity
 
- 
 - 
Field Summary- 
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
 
- 
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddWhereUsed(java.lang.String target, java.lang.String reference)Add a conditional reference to the array indicated by the target system name.ConditionalcreateNewConditional(java.lang.String systemName, java.lang.String userName)Method to create a new Conditional if the Conditional does not exist Returns null if a Conditional with the same systemName or userName already exists, or if there is trouble creating a new Conditional If the parent Logix cannot be found, the userName cannot be checked, but the Conditional is still created.voiddeleteConditional(Conditional c)Delete Conditional by removing it from the manager.voiddisplayWhereUsed()Display the complete structure, used for debugging purposes.voiddispose()Free resources when no longer used.ConditionalgetBySystemName(java.lang.String s)Locate an existing instance based on a system name.ConditionalgetByUserName(java.lang.String s)Locate an existing instance based on a user name.ConditionalgetByUserName(Logix x, java.lang.String s)ConditionalgetConditional(java.lang.String name)ConditionalgetConditional(Logix x, java.lang.String name)Method to get an existing Conditional.LogixgetParentLogix(java.lang.String name)Parses the Conditional system name to get the parent Logix system name, then gets the parent Logix, and returns it.java.util.List<java.lang.String>getSystemNameListForLogix(Logix x)Get a list of all Conditional system names with the specified Logix parent.java.util.ArrayList<java.lang.String>getTargetList(java.lang.String reference)Get the target system names used by this conditionaljava.util.ArrayList<java.lang.String>getWhereUsed(java.lang.String target)Get a list of conditional references for the indicated conditionaljava.util.HashMap<java.lang.String,java.util.ArrayList<java.lang.String>>getWhereUsedMap()Return a copy of the entire map.voidremoveWhereUsed(java.lang.String target, java.lang.String reference)Remove a conditional reference from the array indicated by the target system name.- 
Methods inherited from interface jmri.ManageraddDataListener, deleteBean, deregister, 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.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
 
- 
 
- 
- 
- 
Method Detail- 
disposevoid dispose() Description copied from interface:ManagerFree resources when no longer used. Specifically, remove all references to and from this object, so it can be garbage-collected.- Specified by:
- disposein interface- Manager<Conditional>
 
 - 
createNewConditionalConditional createNewConditional(java.lang.String systemName, java.lang.String userName) Method to create a new Conditional if the Conditional does not exist Returns null if a Conditional with the same systemName or userName already exists, or if there is trouble creating a new Conditional If the parent Logix cannot be found, the userName cannot be checked, but the Conditional is still created. The scenario can happen when a Logix is loaded from a file after its Conditionals.- Parameters:
- systemName- the system name
- userName- the user name
- Returns:
- the new conditional or null if a Conditional already exists with either name
 
 - 
getParentLogix@CheckForNull Logix getParentLogix(java.lang.String name) Parses the Conditional system name to get the parent Logix system name, then gets the parent Logix, and returns it.- Parameters:
- name- system name of Conditional
- Returns:
- the logix for the conditional
 
 - 
getConditional@CheckForNull Conditional getConditional(Logix x, java.lang.String name) Method to get an existing Conditional. First looks up assuming that name is a User Name. Note: the parent Logix must be passed in x for user name lookup. If this fails, or if x == null, looks up assuming that name is a System Name. If both fail, returns null.- Parameters:
- x- parent Logix (may be null)
- name- name to look up
- Returns:
- null if no match found
 
 - 
getConditional@CheckForNull Conditional getConditional(java.lang.String name) 
 - 
getByUserName@CheckForNull Conditional getByUserName(java.lang.String s) Description copied from interface:ManagerLocate an existing instance based on a user name.- Specified by:
- getByUserNamein interface- Manager<Conditional>
- Parameters:
- s- System Name of the required NamedBean
- Returns:
- requested NamedBean object or null if none exists
 
 - 
getByUserNameConditional getByUserName(Logix x, java.lang.String s) 
 - 
getBySystemNameConditional getBySystemName(java.lang.String s) Description copied from interface:ManagerLocate an existing instance based on a system name.- Specified by:
- getBySystemNamein interface- Manager<Conditional>
- Parameters:
- s- System Name of the required NamedBean
- Returns:
- requested NamedBean object or null if none exists
 
 - 
getSystemNameListForLogixjava.util.List<java.lang.String> getSystemNameListForLogix(Logix x) Get a list of all Conditional system names with the specified Logix parent.- Parameters:
- x- the logix
- Returns:
- a list of Conditional system names
 
 - 
deleteConditionalvoid deleteConditional(Conditional c) Delete Conditional by removing it from the manager. The parent Logix must first be deactivated so it stops processing.- Parameters:
- c- the conditional to remove
 
 - 
getWhereUsedMapjava.util.HashMap<java.lang.String,java.util.ArrayList<java.lang.String>> getWhereUsedMap() Return a copy of the entire map. Used byLogixTableAction.buildWhereUsedListing()- Returns:
- a copy of the map
- Since:
- 4.7.4
 
 - 
addWhereUsedvoid addWhereUsed(@CheckForNull java.lang.String target, @CheckForNull java.lang.String reference) Add a conditional reference to the array indicated by the target system name.- Parameters:
- target- The system name for the target conditional
- reference- The system name of the conditional that contains the conditional reference
- Since:
- 4.7.4
 
 - 
getWhereUsedjava.util.ArrayList<java.lang.String> getWhereUsed(java.lang.String target) Get a list of conditional references for the indicated conditional- Parameters:
- target- The target conditional for a conditional reference
- Returns:
- an ArrayList or null if none
- Since:
- 4.7.4
 
 - 
removeWhereUsedvoid removeWhereUsed(java.lang.String target, java.lang.String reference) Remove a conditional reference from the array indicated by the target system name.- Parameters:
- target- The system name for the target conditional
- reference- The system name of the conditional that contains the conditional reference
- Since:
- 4.7.4
 
 - 
displayWhereUsedvoid displayWhereUsed() Display the complete structure, used for debugging purposes.- Since:
- 4.7.4
 
 - 
getTargetListjava.util.ArrayList<java.lang.String> getTargetList(java.lang.String reference) Get the target system names used by this conditional- Parameters:
- reference- The system name of the conditional the refers to other conditionals.
- Returns:
- a list of the target conditionals
- Since:
- 4.7.4
 
 
- 
 
-