Occasionally, during development it is necessary (or simpler) to make use of Java classes that aren't already included within Talend. These may be pre-existing Java code such as financial calculations or open source libraries, which are provided by The Apache Software Foundation (www.apache.org).
In this example, we will make use of a simple Java class ExternalValidations
and its ExternalValidateCustomerName
method. This class performs the following simple validation:
if (customerName.startsWith("J ")) { return customerName.replace("J ", "James "); } else { if (customerName.startsWith("Jo ")) { return customerName.replace("Jo ", "Joanne "); } else { return customerName; } }