Defining Java Implementations for Uniface Components

The signatures of Uniface components that are called by Java applications must specify a Java component implementation. The signature can then be used to generate Java wrapper classes for the component.

Uniface automatically creates a signature for each Uniface component when it is compiled. The default component implementation is Uniface, but you need to add a Java call-in implementation to the signature. A component implementation defines the technology used to deploy the component.

You can optionally provide mappings for the component name, operations, and parameters to a Java class, methods, and parameters. If no mappings are defined for the Java call-in implementation, default name and data type mappings are used when generating the Java wrapper classes. For more information, see Mappings in Generated Java Files.

To add a Java implementation to the signature of Java, use the Signature Editor.

  1. Add a Java Call-in implementation to the signature.
    1. Open the signature of a Uniface component in the Signature Editor.
    2. Click >> to the right of the Implementations field.
    3. Click New, then select Java Call-in from the list.
    4. Click OK to return to the Signature Editor.
  2. Optionally, map the component name to a Java class name.
    1. In the Signature Editor, click Properties, then then double-click Java in the Call-in Properties field.
    2. In the Define Java Properties dialog, enter a case-sensitive Class Name.

      You can enter component name which, in the generated Java code, is the name of the generated class..

  3. Optionally, map operation names to Java methods names.
    1. In the Signature Editor, select the operation for which you want to define mappings.
    2. Click >> to the right of the Details of ... field.
    3. In the Define Operation dialog, select Java Call-In as the Implementation.
    4. Enter a case-sensitive operation name for the Java method in the Literal Name field, and select the Return Value option.

      Three return types are supported in the Java-specific signature information. If the return type is not specified, the default option None (void) is used. This means that $status is returned only if explicitlyspecified. The return data type for $status is a Java int.

      None (void) is used so the return value can be reserved for passing one OUT value, if the operation has only one INOUT or OUT parameter.

  4. Optionally, map operation parameters to Java method parameters.
    1. In the Signature Editor, select the parameter for which you want to define mappings, and click >> to the right of the Parameters field.
    2. In the Define Parameter dialog, select Java Call-In as the Implementation.
    3. For each parameter, in the Details of Java call-in enter a case-sensitive parameter name for the Java parameter in the Literal Name field.

      For a basic parameter, also specify the Interface (the data type).

      For an entity parameter, also specify the number of occurrences.