Interface CatalogTreeManager
-
- All Superinterfaces:
Manager<CatalogTree>
,PropertyChangeProvider
,SilenceablePropertyChangeProvider
,VetoableChangeProvider
- All Known Implementing Classes:
DefaultCatalogTreeManager
public interface CatalogTreeManager extends Manager<CatalogTree>
Locate a CatalogTree object representing some specific information.CatalogTree objects are obtained from a CatalogTreeManager, which in turn is generally located from the InstanceManager.
Much of the book-keeping is implemented in the AbstractCatalogTreeManager class, which can form the basis for a system-specific implementation.
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 Modifier and Type Field Description static java.lang.String[]
IMAGE_FILTER
static java.lang.String[]
SCRIPT_FILTER
static java.lang.String[]
SOUND_FILTER
-
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 CatalogTree
getBySystemName(java.lang.String systemName)
Locate an instance based on a system name.CatalogTree
getByUserName(java.lang.String userName)
Locate an instance based on a user name.CatalogTree
getCatalogTree(java.lang.String name)
Locate via user name, then system name if needed.void
indexChanged(boolean changed)
boolean
isIndexChanged()
boolean
isIndexLoaded()
void
loadImageIndex()
CatalogTree
newCatalogTree(java.lang.String systemName, java.lang.String userName)
Get a CatalogTree instance with the specified system and user names.void
storeImageIndex()
-
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
-
-
-
-
Field Detail
-
IMAGE_FILTER
static final java.lang.String[] IMAGE_FILTER
-
SOUND_FILTER
static final java.lang.String[] SOUND_FILTER
-
SCRIPT_FILTER
static final java.lang.String[] SCRIPT_FILTER
-
-
Method Detail
-
getCatalogTree
@CheckForNull CatalogTree getCatalogTree(@Nonnull java.lang.String name)
Locate via user name, then system name if needed. If that fails, return null- Parameters:
name
- CatalogTree object to locate- Returns:
- null if no match found
-
getBySystemName
@CheckForNull CatalogTree getBySystemName(@Nonnull java.lang.String systemName)
Locate an instance based on a system name. Returns null if no instance already exists.- Specified by:
getBySystemName
in interfaceManager<CatalogTree>
- Parameters:
systemName
- CatalogTree object to locate- Returns:
- requested CatalogTree object or null if none exists
-
getByUserName
@CheckForNull CatalogTree getByUserName(@Nonnull java.lang.String userName)
Locate an instance based on a user name. Returns null if no instance already exists.- Specified by:
getByUserName
in interfaceManager<CatalogTree>
- Parameters:
userName
- CatalogTree object to locate- Returns:
- requested CatalogTree object or null if none exists
-
newCatalogTree
@Nonnull CatalogTree newCatalogTree(@Nonnull java.lang.String systemName, java.lang.String userName) throws java.lang.IllegalArgumentException
Get a CatalogTree instance with the specified system and user names. Note that two calls with the same arguments will get the same instance; there is only one CatalogTree object representing a given physical CatalogTree and therefore only one with a specific system or user name.This will always return a valid object reference; a new object will be created if necessary. In that case:
- If a null reference is given for user name, no user name will be associated with the CatalogTree object created; a valid system name must be provided
- If both names are provided, the system name defines the hardware access of the desired CatalogTree, and the user address is associated with it. The system name must be valid.
- Parameters:
systemName
- system name for new CatalogTreeuserName
- user name for new CatalogTree- Returns:
- requested CatalogTree object (never null)
- Throws:
java.lang.IllegalArgumentException
- if unable to create.
-
storeImageIndex
void storeImageIndex()
-
loadImageIndex
void loadImageIndex()
-
isIndexChanged
boolean isIndexChanged()
-
isIndexLoaded
boolean isIndexLoaded()
-
indexChanged
void indexChanged(boolean changed)
-
-