User Manual

Java Data Source User Guide

8/7/26
Java Data Source User Guide

The Java data source is one of the integration methods available on the Kuika platform that allows you to develop custom functions and business logic. Using Java, you can define custom operations within your application, create methods that accept parameters, and use these methods in application workflows.

With the Java data source, you can write custom code to address needs beyond the built-in actions, customize data processing workflows, and create reusable functions.

You may need to have an appropriate subscription plan to use the Java data source feature. You can upgrade your subscription to access more advanced development tools.

Add a Data Source Connection to Your App with Java

  1. Log in to the Kuika platform and open the project you’ll be working on from the Apps screen.
  2. Open the Data Sources module.
    • Here, you can view existing data sources and add a new one.
  3. In the left panel, click the + icon next to the Sources heading.
  4. On the Add a new Datasource screen that opens, select the Java option under the Development category.
  5. Enter a name for your data source.
  6. Click the CREATE button to complete the process.

Anatomy of the Java Action Modal

A. Top Menu

  • Title (Java Action): The modal’s title indicates that the created data source is a Java-based action.
  • CREATE Button: Used to save the Java data source you have created.
  • Close Button (X): Used to close the screen and exit the process.

B. Top Settings Area

  • Userguide: An area where you can enter a description of what your function does. It helps other developers—or you in the future—remember the purpose of the code.
  • External Libraries (BETA): This section allows you to add external libraries (JARs/dependencies) to use in your Java code. It is currently labeled BETA.
  • Java version: This drop-down menu lets you specify which Java version your code will be compiled and run on. Supported versions:
    • Java 21 (LTS)
    • Java 17 (LTS)
    • Java 11 (LTS)
    • Java 8 (LTS)
  • By default, the latest LTS version (Java 21) is selected; you can choose an older LTS version as needed.
  • Generate with AI: This option is used to automatically generate Java code with AI support. When enabled, code suggestions can be obtained from the system.

C. Java Editor

  • This is the code editing area.
  • All custom methods are defined here.
  • Default example structure:
public class Main {
  public static String greet(String name) {
    return "Hello, " + name;
  }
}

This structure demonstrates the following:

  • Code is defined within a class (the default class name is Main).
  • Methods are created as static.
  • They can accept parameters.
  • The parameter type can be specified (e.g., String).
  • The return type can be defined (e.g., String).

D. TIDY UP Button

  • Located in the upper-right corner of the code editor.
  • It is used to format, indent, and make the written code more readable.

E. Test Console

  • This area, located at the bottom of the screen, is used to test the methods you’ve written.
  • In this section:
    • A list of methods is displayed.
    • Parameter input fields are provided.
    • The output results can be viewed.

Configuring Java Data Source Settings

Manual Code Writing

If “Generate with AI” is turned off, all code is written manually directly in the editor.

Example:

public class Main {
  public static String toUpperCase(String text) {
    return text.toUpperCase();
  }
}

Code Generation with AI

If you enable the “Generate with AI” feature, you can automatically generate code by entering a description.

Example command:

Create a method that converts the entered text to uppercase.

Selecting a Java Version

You can select the Java version in which your code will be compiled/run from the Java version dropdown menu. Since language features or library compatibility may vary between different versions, it is recommended that you select the LTS version appropriate for your project’s needs.

Using External Libraries (BETA)

Through the External Libraries section, you can include additional dependencies in your project beyond the standard Java libraries. This feature is currently in the BETA phase.

Parameter Definition

You can add parameters to your methods.

Example:

public class Main {
  public static double sum(double value1, double value2) {
    return value1 + value2;
  }
}

This method takes two numbers and returns their sum.

Specifying the Return Type

The data type to be returned must be specified at the beginning of the method definition.

Example types:

  • String
  • int
  • double
  • boolean
  • Object
  • List<T>

Testing Methods with the Test Console

After writing your code, you can use the Test Console section below.

  1. Select the method you want to test.
  2. Enter sample data into the parameter fields.
  3. Run the method.
  4. Check the return result.

Example:

public class Main {
  public static String hello(String name) {
    return "Hello " + name;
  }
}

Parameter: Kuika Expected output: Hello Kuika

Saving the Data Source with CREATE

After completing and testing your code, you can save the Java data source by clicking the CREATE button. The saved data source becomes available for use within the application.

Expected Output / Result

Once these steps are complete:

  • The Java data source is added to the Sources list.
  • The defined methods become available for use in the system.
  • Custom business rules can be managed via code.
  • A reusable function structure is created.
No items found.

Other Related Content

No items found.

Glossary

No items found.

Alt Başlıklar