Class FeatureModule

java.lang.Object
com.moneydance.apps.md.controller.FeatureModule

public abstract class FeatureModule
extends java.lang.Object
This is the parent class of all extensions. You might think of it like an Applet, but with less restrictions.
  • Nested Class Summary

    Nested Classes 
    Modifier and Type Class Description
    static class  FeatureModule.ActionType  
  • Field Summary

    Fields 
    Modifier and Type Field Description
    static java.lang.String MONEYBOT_INVOKE_TARGET  
  • Constructor Summary

    Constructors 
    Modifier Constructor Description
    protected FeatureModule()  
  • Method Summary

    Modifier and Type Method Description
    void cleanup()
    This is called when a data set is closed, so that the extension can let go of any references that it may have to the data or the GUI.
    int getBuild()  
    protected FeatureModuleContext getContext()
    Get the context in which this extension is running.
    java.lang.String getDescription()  
    java.lang.String getDisplayName()  
    java.awt.Image getIconImage()
    Get an icon image that represents this extension and can be used in a button bar.
    java.lang.String getIDStr()
    Get the ID string for this extension.
    abstract java.lang.String getName()
    Get a descriptive name for this extension.
    java.io.File getSourceFile()
    Gets the file from which the extension was loaded, if any.
    java.lang.String getVendor()  
    java.lang.String getVendorURL()  
    void handleEvent​(java.lang.String appEvent)
    Notifies the extension that the given application event has occurred.
    void init()
    Initialize the extension.
    abstract void invoke​(java.lang.String uri)
    This is called when an extension is invoked using a moneydance URI.
    boolean isBundled()  
    boolean isVerified()  
    java.lang.String toString()  
    void unload()
    This is called when the extension is unloaded from the application.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

  • Constructor Details

  • Method Details

    • isBundled

      public final boolean isBundled()
    • isVerified

      public final boolean isVerified()
    • getContext

      protected final FeatureModuleContext getContext()
      Get the context in which this extension is running. The context is the mechanism by which the extension interfaces with the rest of the program.
    • getSourceFile

      public final java.io.File getSourceFile()
      Gets the file from which the extension was loaded, if any.
    • init

      public void init()
      Initialize the extension. This is called just after the module is loaded. At this point the moneydance UI has already been loaded (but is not necessarily visible) and the data file may or may not have been loaded.
    • invoke

      public abstract void invoke​(java.lang.String uri)
      This is called when an extension is invoked using a moneydance URI. Only the part of the URI after the extension identifier is included in the URI. For example, if the following URI is invoked: moneydance:module:taxman:show_summary:year=1999 then the invoke method of the "taxman" extension is called with the uri parameter set to: "show_summary:year=1999".
    • handleEvent

      public void handleEvent​(java.lang.String appEvent)
      Notifies the extension that the given application event has occurred. More information on events triggered by Moneydance will be available at a later date.
    • getName

      public abstract java.lang.String getName()
      Get a descriptive name for this extension.
    • getIconImage

      public java.awt.Image getIconImage()
      Get an icon image that represents this extension and can be used in a button bar.
    • getIDStr

      public final java.lang.String getIDStr()
      Get the ID string for this extension. This is the unique string that identifies this extension, and is used to invoke it via a URI such as moneydance:moduleID:some-action
    • getDisplayName

      public java.lang.String getDisplayName()
      Returns:
      The full name of the module to identify it to the user.
    • getVendor

      public java.lang.String getVendor()
      Returns:
      The name of the person or entity that created this extension.
    • getVendorURL

      public java.lang.String getVendorURL()
      Returns:
      The URL of the person or entity that created this extension.
    • getDescription

      public java.lang.String getDescription()
      Returns:
      A description of this extension.
    • getBuild

      public int getBuild()
      Returns:
      The current version or build number of this extension.
    • unload

      public void unload()
      This is called when the extension is unloaded from the application. The implementation of this method should remove the extension as a listener from all parts of the application, and stop any threads that may have been started by the extension.
    • cleanup

      public void cleanup()
      This is called when a data set is closed, so that the extension can let go of any references that it may have to the data or the GUI. If there are any windows open, they should be closed, and any state information should be discarded. Subclasses should override this if they maintain any state, or can have open windows. Subclasses should also use this method to deregister any listeners to the data set.
    • toString

      public final java.lang.String toString()
      Overrides:
      toString in class java.lang.Object