Interface ModuleInfo

    • Method Detail

      • getInput

        ModuleItem<?> getInput​(String name)
        Gets the input item with the given name.
      • getOutput

        ModuleItem<?> getOutput​(String name)
        Gets the output item with the given name.
      • getDelegateClassName

        String getDelegateClassName()
        Gets the fully qualified name of the class containing the module's actual implementation. By definition, this is the same value returned by createModule().getDelegateObject().getClass().getName(), and hence is also the class containing any callback methods specified by ModuleItem.getCallback().

        The nature of this method is implementation-specific; for example, a CommandModule will return the class name of its associated Command. For modules that are not commands, the result may be something else.

        If you are implementing this interface directly, a good rule of thumb is to return the class name of the associated Module (i.e., the same value given by createModule().getClass().getName()).

      • isInteractive

        default boolean isInteractive()
        Gets whether the module is intended to be run interactively. Typically this means its inputs are supposed to be presented in a non-modal dialog box, with Runnable.run() being called whenever any of the values change.
      • canPreview

        default boolean canPreview()
        Gets whether the module supports previews. A preview is a quick approximation of the results that would be obtained by actually executing the module with Runnable.run(). If this method returns false, then calling Module.preview() will have no effect.
      • canCancel

        default boolean canCancel()
        Gets whether the module condones cancellation. Strictly speaking, any module execution can be canceled during preprocessing, but this flag is a hint that doing so may be a bad idea, and the UI may want to disallow it. If this method returns false, then calling Module.cancel() will have no effect.
      • canRunHeadless

        default boolean canRunHeadless()
        Gets whether the module condones headless execution. Strictly speaking, there is no guarantee that any module will work headless just because it declares itself so, but this flag hints that headless execution is likely to succeed (if flag is true), or fail (if flag is false).
      • getInitializer

        default String getInitializer()
        Gets the function that is called to initialize the module's values.
      • update

        default void update​(EventService eventService)
        Notifies interested parties that the module info has been modified. This mechanism is useful for updating any corresponding user interface such as menu items that are linked to the module.
      • getTitle

        default String getTitle()
        Description copied from interface: UIDetails
        Gets an appropriate title for the object, for use in a user interface. The result is prioritized as follows:
        1. Item label
        2. Menu path's leaf entry name
        3. Item name
        4. Item's class name, without package prefix
        Specified by:
        getTitle in interface UIDetails
      • isValid

        default boolean isValid()
        Description copied from interface: Validated
        Gets whether the object is completely valid (i.e., no problems during initialization).
        Specified by:
        isValid in interface Validated
      • getIdentifier

        default String getIdentifier()
        Description copied from interface: Identifiable
        Gets a string intended to function as an identifier for the object.
        Specified by:
        getIdentifier in interface Identifiable
      • getLocation

        default String getLocation()
        Description copied from interface: Locatable
        Gets the URL string defining the object's location.
        Specified by:
        getLocation in interface Locatable
      • getVersion

        default String getVersion()
        Description copied from interface: Versioned
        Gets the version of the object.
        Specified by:
        getVersion in interface Versioned