Version

    JavaExecute

    Deprecated Component

    Short Description
    Ports
    JavaExecute Attributes
    Details
    Best Practices
    Compatibility
    See also

    Short Description

    JavaExecute executes Java commands.

    JavaExecute is deprecated. Use CustomJavaComponent instead of JavaExecute.

    ComponentSame input metadataSorted inputsInputsOutputsEach to all outputsJavaCTLAuto-propagated metadata
    JavaExecute--00-
    yes
    no
    -

    Ports

    JavaExecute has neither an input nor output port.

    JavaExecute Attributes

    AttributeReqDescriptionPossible values
    Basic
    Runnable[1]Runnable transformation in Java defined in the graph. 
    Runnable URL[1]The external file defining the runnable transformation in Java. 
    Runnable class[1]An external runnable transformation class. 
    Runnable source charset 

    Encoding of the external file defining the transformation.

    The default encoding depends on DEFAULT_SOURCE_CODE_CHARSET in defaultProperties.

    E.g. UTF-8
    Advanced
    Properties Properties to be used when executing a Java command. 

    [1]  One of these must be set. These transformation attributes must be specified. Any of these transformation attributes implements a JavaRunnable interface.

    For more information, see Java Interfaces for JavaExecute.

    For detailed information about transformations, see also Defining Transformations.

    Details

    JavaExecute executes Java commands. A runnable transformation, which is required in the component, implements a JavaRunnable interface and inherits other common methods from the Transform interface. See Common Java Interfaces.

    Below is the list of JavaRunnable interface methods. For more information, see Java Interfaces for JavaExecute.

    Java Interfaces for JavaExecute

    A runnable transformation, which is required in the component, implements a JavaRunnable interface and inherits other common methods from the Transform interface. See Common Java Interfaces.

    Following are the methods of the JavaRunnable interface:

    • boolean init(Properties parameters)

      Initializes a Java class/function. This method is called only once at the beginning of the transformation process. Any object allocation/initialization should happen here.

    • void free()

      This is a de-initialization method for this graph element. All resources allocated in the init() method should be released here. This method is invoked only once at the end of the element existence.

    • void run()

      The core method, which holds the implementation of the Java code to be run by the JavaExecute component.

    • void setGraph(TransformationGraph graph)

      A method which passes into the transformation graph instance within which the transformation will be executed. Since TransformationGraph singleton pattern was removed, it is no longer possible to access graph's parameters and other elements (e.g. metadata definitions) through TransformationGraph.getInstance().

    Best Practices

    If the transformation is specified in an external file (with Runnable URL), we recommend users to explicitly set Runnable source charset.

    Compatibility

    VersionCompatibility Notice
    4.1.0-M1

    JavaExecute was deprecated. Use CustomJavaComponent instead.