Package jmri.jmrit.logixng
Interface GlobalVariableManager
-
- All Superinterfaces:
Manager<GlobalVariable>
,PropertyChangeProvider
,SilenceablePropertyChangeProvider
,VetoableChangeProvider
- All Known Implementing Classes:
DefaultGlobalVariableManager
public interface GlobalVariableManager extends Manager<GlobalVariable>
Manager for GlobalVariable
-
-
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 Default Methods Modifier and Type Method Description GlobalVariable
createGlobalVariable(java.lang.String userName)
For use with User GUI, to allow the auto generation of systemNames, where the user can optionally supply a username.GlobalVariable
createGlobalVariable(java.lang.String systemName, java.lang.String userName)
Create a new GlobalVariable if the GlobalVariable does not exist.void
deleteGlobalVariable(GlobalVariable x)
Delete GlobalVariable by removing it from the manager.java.lang.String
getAutoSystemName()
Create a new system name for a GlobalVariable.GlobalVariable
getBySystemName(java.lang.String name)
Locate an existing instance based on a system name.GlobalVariable
getByUserName(java.lang.String name)
Locate an existing instance based on a user name.GlobalVariable
getGlobalVariable(java.lang.String name)
Locate via user name, then system name if needed.default java.lang.String
getSubSystemNamePrefix()
Get the sub system prefix of this manager.void
printTree(java.util.Locale locale, java.io.PrintWriter writer, java.lang.String indent)
Print the tree to a stream.-
Methods inherited from interface jmri.Manager
addDataListener, deleteBean, deregister, dispose, getBeanTypeHandled, getBeanTypeHandled, getEntryToolTip, getKnownBeanProperties, getMemo, getNamedBean, getNamedBeanClass, getNamedBeanSet, getObjectCount, 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
-
createGlobalVariable
GlobalVariable createGlobalVariable(java.lang.String systemName, java.lang.String userName) throws java.lang.IllegalArgumentException
Create a new GlobalVariable if the GlobalVariable does not exist.- Parameters:
systemName
- the system nameuserName
- the user name- Returns:
- a new GlobalVariable or null if unable to create
- Throws:
java.lang.IllegalArgumentException
-
createGlobalVariable
GlobalVariable createGlobalVariable(java.lang.String userName) throws java.lang.IllegalArgumentException
For use with User GUI, to allow the auto generation of systemNames, where the user can optionally supply a username.- Parameters:
userName
- the user name- Returns:
- a new GlobalVariable or null if unable to create
- Throws:
java.lang.IllegalArgumentException
-
getGlobalVariable
GlobalVariable getGlobalVariable(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
-
getByUserName
GlobalVariable getByUserName(java.lang.String name)
Locate an existing instance based on a user name.- Specified by:
getByUserName
in interfaceManager<GlobalVariable>
- Parameters:
name
- System Name of the required NamedBean- Returns:
- requested NamedBean object or null if none exists
-
getBySystemName
GlobalVariable getBySystemName(java.lang.String name)
Locate an existing instance based on a system name.- Specified by:
getBySystemName
in interfaceManager<GlobalVariable>
- Parameters:
name
- System Name of the required NamedBean- Returns:
- requested NamedBean object or null if none exists
-
getAutoSystemName
java.lang.String getAutoSystemName()
Create a new system name for a GlobalVariable.- Returns:
- a new system name
-
getSubSystemNamePrefix
default java.lang.String getSubSystemNamePrefix()
Get the sub system prefix of this manager. The sub system prefix is the system name prefix and possibly some extra characters of the NamedBeans handled by this manager.For most managers, this is the same as
Manager.getSystemNamePrefix()
, but for some like the managers in LogixNG, it differs. The sub system prefix for the GlobalVariableManager isManager.getSystemNamePrefix()
and "GV";- Specified by:
getSubSystemNamePrefix
in interfaceManager<GlobalVariable>
- Returns:
- the sub system prefix
-
deleteGlobalVariable
void deleteGlobalVariable(GlobalVariable x)
Delete GlobalVariable by removing it from the manager. The GlobalVariable must first be deactivated so it stops processing.- Parameters:
x
- the GlobalVariable to delete
-
printTree
void printTree(java.util.Locale locale, java.io.PrintWriter writer, java.lang.String indent)
Print the tree to a stream.- Parameters:
locale
- The locale to be usedwriter
- the stream to print the tree toindent
- the indentation of each level
-
-