Class NceConsistRoster

All Implemented Interfaces:
InstanceManagerAutoDefault, InstanceManagerAutoInitialize

public class NceConsistRoster
extends XmlFile
implements InstanceManagerAutoDefault, InstanceManagerAutoInitialize
NCE Consist Roster manages and manipulates a roster of consists.

It works with the "consist-roster-config" XML DTD to load and store its information.

This is an in-memory representation of the roster xml file (see below for constants defining name and location). As such, this class is also responsible for the "dirty bit" handling to ensure it gets written. As a temporary reliability enhancement, all changes to this structure are now being written to a backup file, and a copy is made when the file is opened.

Multiple Roster objects don't make sense, so we use an "instance" member to navigate to a single one.

This predates the "XmlFile" base class, so doesn't use it. Not sure whether it should...

The only bound property is the list of s; a PropertyChangedEvent is fired every time that changes.

The entries are stored in an ArrayList, sorted alphabetically. That sort is done manually each time an entry is added.

See Also: