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.
-
Add a Java Call-in implementation to the signature.
- Open the signature of a Uniface component in the Signature Editor.
- Click >> to the right of the Implementations field.
- Click New,
then select
Java Call-in
from the list. - Click OK to return to the Signature Editor.
-
Optionally, map the component name to a Java class name.
- In the Signature Editor, click Properties, then then double-click Java in the Call-in Properties field.
-
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..
-
Optionally, map operation names to Java methods names.
- In the Signature Editor, select the operation for which you want to define mappings.
- Click >> to the right of the Details of ... field.
-
In the Define Operation dialog, select
Java Call-In
as the Implementation. - 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.
- Optionally, map operation parameters to Java method parameters.
- In the Signature Editor, select the parameter for which you want to define mappings, and click >> to the right of the Parameters field.
-
In the Define Parameter dialog, select
Java Call-In
as the Implementation. -
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.