public class MessageGroupCatalog
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
LocalDestinationRecord |
addRow()
Create a new initially-disabled LocalDestinationRecord to the catalog.
|
void |
deleteRow(int rowIndex)
Delete the specified record from the catalog, including from the Preferences backing store.
|
void |
flushToPreferences(LocalDestinationRecord ldr)
Persist the specified LocalDestinationRecord to Preferences.
|
LocalDestinationRecord[] |
getCustomDestinations()
Get a list of all locally-defined destinations.
|
static MessageGroupCatalog |
getInstance()
Get the singleton MessageGroupCatalog object.
|
LocalDestinationRecord |
getLocalDestination(java.lang.String callsign)
Test if the specified addressee is recognized as an alias for the local station.
|
int |
getMessageGroupCount()
Get the number of message groups registered in the catalog.
|
LocalDestinationRecord |
getRow(int rowIndex)
Get the Nth record in the MessageGroupCatalog.
|
void |
init(java.util.prefs.Preferences prefs)
Load the MessageGroupCatalog with persisted values from the Java Preferences store.
|
LocalDestinationRecord |
insertDefaultRow(int row,
java.lang.String callsign)
Create a new initially-enabled LocalDestinationRecord at the specified index within
the catalog.
|
static boolean |
isWeatherDestination(LocalDestinationRecord ldr)
Test whether this address group is a national weather service destination (that
only NWS stations should use).
|
public static MessageGroupCatalog getInstance()
public void init(java.util.prefs.Preferences prefs) throws java.util.prefs.BackingStoreException
prefs
- root Preferences node of YAAC configurationjava.util.prefs.BackingStoreException
- if preferences could not be read for any reasonpublic int getMessageGroupCount()
public LocalDestinationRecord getRow(int rowIndex)
rowIndex
- zero-based index of record to fetchpublic static boolean isWeatherDestination(LocalDestinationRecord ldr)
ldr
- LocalDestinationRecord to testpublic LocalDestinationRecord addRow()
public LocalDestinationRecord insertDefaultRow(int row, java.lang.String callsign)
row
- zero-based index where new record should be insertedcallsign
- String alias to be assigned to the new recordpublic void flushToPreferences(LocalDestinationRecord ldr)
ldr
- LocalDestinationRecord to savepublic void deleteRow(int rowIndex)
rowIndex
- zero-based index of record to deletepublic LocalDestinationRecord getLocalDestination(java.lang.String callsign)
callsign
- String to test against known local aliasespublic LocalDestinationRecord[] getCustomDestinations()