Interface Module

    • Method Detail

      • preview

        void preview()
        Computes a preview of the module's execution results, if available. A preview is a quick approximation of the results that would be obtained by actually executing the module with Runnable.run(). Not all modules support previews.
        See Also:
        ModuleInfo.canPreview()
      • cancel

        void cancel()
        Performs necessary cleanup in response to cancellation of the module execution. This is useful in conjunction with preview() to undo any changes made as a result of the preview.
        See Also:
        ModuleInfo.canCancel()
      • getInfo

        ModuleInfo getInfo()
        Gets metadata about this module.
      • getDelegateObject

        Object getDelegateObject()
        Gets the object containing the module's actual implementation. By definition, this is an object whose fully qualified class name is given by getInfo().getDelegateClassName(). This object must possess all callback methods specified by ModuleItem.getCallback().

        The nature of this method is implementation-specific; e.g., a CommandModule will return its associated Command. For modules that are not plugins, the result may be something else. If you are implementing this interface directly, a good rule of thumb is to return this.

      • getInput

        Object getInput​(String name)
        Gets the value of the input with the given name.
      • getOutput

        Object getOutput​(String name)
        Gets the value of the output with the given name.
      • getInputs

        Map<String,​Object> getInputs()
        Gets a table of input values.
      • getOutputs

        Map<String,​Object> getOutputs()
        Gets a table of output values.
      • setInput

        void setInput​(String name,
                      Object value)
        Sets the value of the input with the given name.
      • setOutput

        void setOutput​(String name,
                       Object value)
        Sets the value of the output with the given name.
      • setInputs

        void setInputs​(Map<String,​Object> inputs)
        Sets input values according to the given table.
      • setOutputs

        void setOutputs​(Map<String,​Object> outputs)
        Sets output values according to the given table.
      • isInputResolved

        boolean isInputResolved​(String name)
        Gets the resolution status of the input with the given name.
        See Also:
        resolveInput(String)
      • isOutputResolved

        boolean isOutputResolved​(String name)
        Gets the resolution status of the output with the given name.
        See Also:
        resolveOutput(String)
      • resolveInput

        void resolveInput​(String name)
        Marks the input with the given name as resolved. A "resolved" input is known to have a final, valid value for use with the module.

        ModulePreprocessors in the module execution chain that populate input values (e.g. InputHarvester plugins) will typically skip over inputs which have already been resolved.

      • resolveOutput

        void resolveOutput​(String name)
        Marks the output with the given name as resolved. A "resolved" output has been handled by the framework somehow, typically displayed to the user.

        ModulePostprocessors in the module execution chain that handle output values (e.g. the DisplayPostprocessor) will typically skip over outputs which have already been resolved.

      • unresolveInput

        void unresolveInput​(String name)
        Marks the input with the given name as unresolved.
        See Also:
        resolveInput(String)
      • unresolveOutput

        void unresolveOutput​(String name)
        Marks the output with the given name as unresolved.
        See Also:
        resolveOutput(String)