public abstract class Provider
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Provider.PortEntry
This class describes the name and implementing Class of an interface port driver.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PLUGIN_NEEDS_NEWER_YAAC_PROTOCOL
Resource tag name for YAAC Provider version number is too old for this plugin.
|
static java.lang.String |
PLUGIN_UNKNOWN_INCOMPATIBILITY
Resource tag name for default generic reason for plugin failure.
|
static int |
PROVIDER_API_VERSION
Define the version of the Provider superclass-defined that this build of YAAC supports.
|
Modifier | Constructor and Description |
---|---|
protected |
Provider(java.lang.String name,
java.lang.String version,
java.lang.String author,
java.lang.String info)
Create a new plugin Provider specifying extensions to be added to YAAC.
|
Modifier and Type | Method and Description |
---|---|
protected static java.lang.String |
buildNewerYaacNeededMsg(int minVersion)
Helper method to create a localized return error message for
getInitFailureReason()
if the reason is due to using a non-upgraded version of core YAAC. |
java.lang.String[] |
consumeXMLPreferenceData(java.lang.String nodeName,
java.lang.String lastNodeName,
java.lang.String key,
java.lang.String value)
Process a Preferences node entry when restoring a configuration XML.
|
protected javax.help.HelpSet |
findHelpSet(java.lang.String helpBaseName,
java.lang.String filePathString)
Helper function to load a helpset if a Provider subclass has one.
|
java.lang.String[] |
getAboutAttributions()
Specify attributions, credits/acknowledgements, and license references to be displayed in the
About dialog box.
|
java.lang.String |
getAuthor()
Get the provider author's name.
|
java.util.Map<java.lang.String,java.lang.String> |
getConfigurationPanels()
Get any panels needed by this Provider to provision or configure the services
offered by the Provider.
|
Filter[] |
getFilters()
Get any filters to add to the main CumulativeBooleanAndFilter in the main class of YAAC.
|
javax.help.HelpSet |
getHelpSet()
Provide an additional HelpSet to merge into the base HelpSet for complete
online documentation.
|
java.lang.String |
getImageIconPath()
Return an icon image associated with this Provider.
|
java.lang.String |
getInfo()
Get a short description of what this provider provides.
|
java.lang.String |
getInitFailureReason()
Get the explanation why the call to
runInitializersBefore(int) returned failure status. |
AbstractMenuAction[] |
getMenuItems()
Get AbstractMenuActions to define new menu items from this Provider.
|
java.lang.String |
getName()
Get the name of the provider.
|
Provider.PortEntry[] |
getPortConnectorTypes()
Get PortConnector drivers provided by this Provider.
|
java.lang.String |
getVersion()
Get the version of the provider.
|
void |
runInitializersAfter()
Execute this function after calling all of the other functions of the
Provider.
|
boolean |
runInitializersBefore(int providerApiVersion)
Execute this function before calling any of the other functions of the
Provider.
|
public static final int PROVIDER_API_VERSION
MsgEventDispatcher
and MsgEventType
API, refactor sounds plugin to use itMsgEventType
for arbitrary announcementsGeoMapIfc
and FullGeoMapIfc
so
all maps have the capability of locating an OpenStreetMap featureWatchedStationsTracker
, removal of obsolete SoundMaker interface, adding
adjustable rollover interval and time zone selection to FileLogger
GeoMapGuiIfc
for access to GeoMapIfc
's implementing graphics widgets,
refactor DigipeatListener
interface to support both first and last digipeaters, add Provider callback for processing saved Preference data,
add hooks to APRS packet creation to allow plugins to add real-time extra dataGuiIfc.getSpeechCustomGrammarForCurrentView()
method and related
interfaces, and restructure menus to support optional speech command pluginWeatherDistributor
, add
ability to parse Age
Strings,
add new service methods for plugins to find other plugins (YAAC.getProviderByName(String)
and
YAAC.getProviderByClassName(String)
), allow quad-sized icons when all icons are
double-sized, allow arbitrary reason to create or remove a WatchedStationsTracker.WatchedStation
,
add purple color for AttentionAlert
s for AX25Message.Precedence.WELFARE
Precedence, factor out weather MADIS validation logic so it can be called by other codeFileLogger
FileLogger.RolloverHandler
s, add MultiEnumCellEditor
for table cells using multiple enum classes, allow plugin activation failure to use localized
messages from the failed plugin.PortExtendedStatusListener
, allow plugins to
specify position ambiguity of StationState objects.SignableMessage
and SaveableTable
,
eliminating UTF8 and ISO_8859_1 Charset constants in AX25Message classAbstractQueryHandler
and the GeoMapIfc
interface,
extra methods added to GeoMapGuiIfc
that implementing plugins will also have to support,
extra BUTTON_FONT property handled by ActionRenderer
, move
APRS-specific listener registration out of the generic AX25Stack
to the
APRSStack
(specifically the APRSStack.addAprsMessageListener(org.ka2ddo.aprs.AprsMessageListener)
method),
move debug control flags out of YAAC main class to DebugCtl
utility class, add
ability to use other HTTP methods besides GET in the mini-webserver, add font rescaling support to the
custom table renderers, support for selectively refusing to use IPv6 network addressesAttentionAlert
to indicate whether alert needs to restore
auto map centering when the alert times out.StationTracker.getStationByAlias(String)
method, expose
line style editors and renderers, fix MainGui.invokeObjectEditor(String, Message, int, int, ObjectReportTransmitter)
to accept dialog titles outside of the core YAAC ResourceBundlesFillEditor
so plugins can use it, allow
forcing the Scope
of APRS Objects in the ObjectEditorGPSDistributor
so most of its
methods are now static, and ensuring that multiple SimpleDateFormat objects can be
created to process parallel GPS data streams without collisions in non-thread-safe
codeGuiSymbols.getQuadStationIcon(char, char)
method to GuiSymbols,
make GPSStatusPane subpanels rescalable, adding font and icon rescaling for various
table cell renderers that didn't already have it, upgrade release of OpenMap to 5.1.15MainGui.MessagingPanel
,
allow SSRenderer
to auto-size APRS symbol icons based on
their associated text font sizeTelemetryMessage
transmittable from the local station,
fix Json
encoding to support embedded objects, bombproof
AgeSpinnerModel
against uninitialized values and ensure
textually-long ages won't get clipped in JSpinners initialized with a short age text,
allow put() call on WeatherDistributor
, allow font
size adjustment for OpenStreetMap renderer layer, add enum support to JSON parser.ProtocolFamily
enum to
help specify which PortConnector
a particular AX25Frame
should
be transmitted through (this is incompatible with previous builds, so all dependencies
must be updated); fix up AX.25 stack connected-mode protocol support; add
getter access to blacklist; add ctl-shift-V clipboard pasting and column width changing escape
sequences to Terminal
.CapabilitiesProvider
interface and
methods to register and unregister instances thereof to the StationTracker
so responses to requests for station capabilities can be customized by plugins, add
more statistics to PortConnectors to identify digipeated and I-gated trafficConnector
traffic statistics to allow
calculating packet routing performance, add new interface HasRemoteAppIfc
for network-based PortConnector
s so that the remote application and its
address can be obtained for reporting purposes, make AddresseeFilter
dynamically modifiable.Connector
object, so digipeating/I-gating decisions can be
made more accurately; add support for plugins to register NMEA-0183 parsers for
specific sentence types; add ability to look up installed plugin providers by
their primary JAR file name (same as in exported XML configuration); augment some of
the generic GUI input dialogs to allow pre-populating with default or old values.PopupMenuMouseAdapter
class; add more accessors to DebugCtl
to support
dynamic changing of logging categories; augment Localizer
to allow looking
up ResourceBundle values without throwing exceptions if value is not present, add
AX25Message.originatingDest
to AX25Message
to ensure I-gating is done correctly.TuneIfc
interface so the Kenwood
radio view can call a plugin that knows how to implement the TUNE
capability, add new GuiContentType
type GuiContentType.LOCAL_OBJECTS
.LineEditor
class
to work with strokes and GuiOsmConstants.StrokeEnum
,
add ScrollableJPanel
class to UI so that large panels
can stay within a reasonably-sized JScrollPane, add SnifferLogFilter
capability, account for re-ordering of startup sequence for first windows.LineOfSightPanel
so extra
details can optionally added to the line-of-sight plot.WayType
s and
Barrier types to OpenStreetMap data to support RF propagation analysis by
line-of-sight, allow popup menus to be constructed from an alternate list.Connector
capability bit Connector.CAP_SUBCLIENT
so that the Pseudo-APRS-IS-Server plugin can have different behavior than for
multiple APRS-IS backbone servers (ex.: APRS2 plus FireNet) connected to same
YAAC instance, add GpsRawNMEA0183Listener
interface
and registration methods for it on the GPSDistributor
.AbstractGpsConnector
method AbstractGpsConnector.stopQueueReader()
,
refactor AX25Stack
to centralize method AX25Stack.dupUnuseDigipeaters(AX25Callsign[])
.MouseWheelCanZoomMap
interface so the
behavior of mouse wheel motion on map displays can be controlled.LineEditor
to allow the color value to be in a different column of the hosting table.FullGeoMapIfc.copyLocationToClipboard(int, int)
and FullGeoMapIfc.getLatLonOfMouseClick(int, int)
to
generic FullGeoMapIfc
interface, expose the CoreProvider.PRE_LOCALIZED_FILE_LOAD_MENU
constants for menu item creation by plugins, refactor glass pane logic so plugins
can put GeoMapGuiIfc.GlassMapPane
s over map windows with
the GeoMapGuiIfc.registerGlassPaneOverMap(GeoMapGuiIfc.GlassMapPane)
method, add Way.findNearestPositionOnWay(double, double, float, boolean)
method to Way
class to find the nearest point
on the Way relative to arbitrary coordinates.WatchedStationsTracker.Importance
option
to tracked stations, add new centralized static method for creating GridBagConstraints
objects in MainGui
class.GeographicalMap.LayerCreator
objects to return
null, stating their Layer cannot be instantiated in the current context, expose the constant
String arrays CoreProvider.PRE_LOCALIZED_FILE_LOAD_MENU
,
CoreProvider.PRE_LOCALIZED_FILE_SAVE_MENU
,
CoreProvider.PRE_LOCALIZED_VIEW_MENU
,
CoreProvider.PRE_LOCALIZED_VIEW_LAYERS_MENU
, and
CoreProvider.PRE_LOCALIZED_LOCATE_MENU
,
add generic input dialog where the text field is initialized to something other than blank,
expose File cache in OSMLayer
for other code that
needs to open the binary-coded OSM files, allow plugin Providers to optionally
provide JDBC database Connections to core YAAC and other plugins by extending the
DbConnectionProvider
abstract superclass, expose listeners for map-based
lat/lon bounding boxes (used formerly only by OSM and topo import dialogs in core YAAC),
have YAAC use AppendableURLClassLoader
s for plugins so plugins can dynamically path
driver or library JARs into classpath, add methods GuiIfc.showGenericQuestionDialogWithWidget(String, String)
and GuiIfc.selectFile(boolean, String, String, String)
to GuiIfc
interface
to allow callers to specify platform specific extra GUIs in standard user input dialogs,
add arbitrary colors to NWSMultiLine
message attributes to support
non-APRS protocols, add MessageWithExpireTime
interface to
support message protocols that explicitly announce when a message will be expired, add
GTNInfoSrc
interface and PopupTaggedNodeWindow
.PopupTaggedNodeWindow.registerGTNInfoSrc(GTNInfoSrc)
registration method so plugins can add extra text to the popup.PositionSrc
interface to generically
provide position information, add ability to read little-endian ordered
binary floating point data to NonshareableBufferedDataInputStream
.Macros
singleton to store macros that can be used
elsewhere in YAAC or its plugins; add AX25Stack.getConnectionRequestListener()
to test if handler has already been defined.MessageGroupCatalog.isWeatherDestination(LocalDestinationRecord)
method to help identify which group destinations should be added to message sending
drop-downs.MainGui.OsmSearchResultsTableModel
,
MainGui.PanToFoundMapFeatureListener
) to be more useful for plugins.runInitializersBefore(int)
,
Constant Field Valuespublic static final java.lang.String PLUGIN_UNKNOWN_INCOMPATIBILITY
public static final java.lang.String PLUGIN_NEEDS_NEWER_YAAC_PROTOCOL
Parameters are:
{0} - protocol version of running YAAC release, i.e. PROVIDER_API_VERSION
{1} - minimum protocol number supported by the plugin
protected Provider(java.lang.String name, java.lang.String version, java.lang.String author, java.lang.String info)
name
- String human-displayed name for this pluginversion
- String version identifier for this pluginauthor
- String name of author(s) of this plugininfo
- String description of what services this plugin providesprotected javax.help.HelpSet findHelpSet(java.lang.String helpBaseName, java.lang.String filePathString)
helpBaseName
- String name of HelpSet file, without the filetype or locale extensionsfilePathString
- directory path relative to the YAAC installation directory to search for .hs filespublic final java.lang.String getName()
public final java.lang.String getVersion()
public final java.lang.String getAuthor()
public final java.lang.String getInfo()
public boolean runInitializersBefore(int providerApiVersion)
If this method returns failure, it should provide an explanation for
failure via the getInitFailureReason()
method; the default implementation
of getInitFailureReason() is only to support older plugin builds before this new
Provider method was added.
providerApiVersion
- the int version of the Provider API supported by
the build of YAAC trying to load this pluginpublic java.lang.String getInitFailureReason()
runInitializersBefore(int)
returned failure status.
If this is an older plugin that does not override this method, the answer will always be "unknown plugin
incompatibility." If the string contains a package-qualified file name followed by a colon and more string text,
it will be assumed to be a translation tag that should be looked up with Localizer.getMsg(String)
,
otherwise it will be displayed as-is to the user. If the localized error message has parameters that should be substituted
into it, overrides of this method should do the lookup and MessageFormat substitution itself rather than
expecting YAAC to do it, i.e.,
return MessageFormat.format(Localizer.getMsg(PLUGIN_NEEDS_NEWER_YAAC_PROTOCOL), YAAC.getCoreProviderVersion(), 15);
The superclass method buildNewerYaacNeededMsg(int)
is available to produce one particular case of
such a message if needed.
runInitializersBefore(int)
protected static java.lang.String buildNewerYaacNeededMsg(int minVersion)
getInitFailureReason()
if the reason is due to using a non-upgraded version of core YAAC.minVersion
- the minimum provider API version number this plugin will acceptpublic java.lang.String getImageIconPath()
public Provider.PortEntry[] getPortConnectorTypes()
public java.util.Map<java.lang.String,java.lang.String> getConfigurationPanels()
Localizer.getMsg(String)
,
Localizer.getMsg(String, String)
,
Localizer.getMsgBundle()
,
Localizer.getMsgBundle(String)
public Filter[] getFilters()
public AbstractMenuAction[] getMenuItems()
May be overridden by subclasses that define new menu choices.
AbstractMenuAction
,
AbstractPopupMenuAction
public java.lang.String[] getAboutAttributions()
Expected to be overridden by subclasses.
public javax.help.HelpSet getHelpSet()
public void runInitializersAfter()
public java.lang.String[] consumeXMLPreferenceData(java.lang.String nodeName, java.lang.String lastNodeName, java.lang.String key, java.lang.String value)
nodeName
- the full relative path String of the Preferences Node being restoredlastNodeName
- the last subnode name of the Preferences Node being restoredkey
- String name of value in the node to be restoredvalue
- String value of the value to be restored