T24 Extensibility for Java
Lesson Overview
I am T24
Customising
T24 using
going to Extensibility in
Java hook
java
describe routines
Your Course » Objective and Learning Outcomes
This course will introduce you to:
• T24 Extensibility in Java
In particular you will be able to:
• Understand T24 extensibility and customisation using Java
• Setup and Use Design Studio to Create and execute
VERSION, ENQUIRY, SERVICE hooks
• Create and execute hooks attached to a local
application
• Debug the Java code in Design Studio
Your Course » Timetable
Day 1 Day 2
• Introduction to T24 Extensibility in Java • ENQUIRY hooks
• Setup Design Studio • SERVICE hooks
• VERSION hooks • Local application using
• DEBUG the Java code in Design Studio [Link]
Lesson 1. Introduction
T24 Extensibility for Java
Agenda - T24 Extensibility in Java
Why do we need T24 Extensibility in Java ?
APIs and Hooks
T-Types
DataAccess
Complex classes
Setup Design Studio
Why do we need T24 Extensibility in Java ?
Scalability and ownership
There are more java developers than jBC developers
Banks can use their own developers
Simplify the T24 APIs
The developer should not need to know about [Link], [Link] or
the different ways of storing an amount field in T24
Governance
We can use the framework to protect t24. for e.g. prevent a select on a
large table that can lead to performance issue for all users
Usage Scenarios
Java extensibility can be used for
Updating User Defined Tables.
Validating transaction IDs entered.
Auto populating fields.
Cross-validating records and fields.
Altering and/or defaulting other field values in the record based on a
field value.
Updating local reference fields.
Raising errors / overrides.
Defining services / COB jobs.
Combining data from different applications for a report
Prerequisites
JD product must be installed
APIs and Hooks
APIs are code Temenos has written that L3 developers can call
Hooks are code L3 developers have written that T24 can call
A developer can attach own logic to T24 to be called from core application
exits using HOOKS
Each hook has been provided with methods to carry out the task
For e..g the Java developer will use the validateField method defined in
[Link] class for field validation
exits
‘T’ types in T24
Classes introduced by Temenos for Java
developers in [Link]
TStructure
TField
TValidationResponse
Many more like TString, TNumber, TBoolean,
TDate …
‘T’ types in T24 - TStructure
The “TStructure” is a generic type containing a record object
TStructure must be ‘cast’ to the correct record type
Maps a jBC dynamic array to java object
To access a record, the java developer must construct an instance of a record or
complex type from the received parameter
‘T’ types in T24 - TField
TField offers getters and setters for Enrichment, Error, field values.
Every field in a record is an internal type TField (not String by default)
‘T’ types in T24 - TValidationResponse
Record validation is a common mechanism in T24 to allow custom validation on
records.
DataAccess
The [Link] class is a utility class to read, select and access
data in T24.
The [Link] package is used to hold records from T24 applications
‘T’ types in T24 – T24Context
T24Context is the way to establish a connection between Java
application and T24
[Link] is required in JAVA_PROJECT to establish the
connection.(available in TAFJ_HOME/lib).
T24Context is used to set the credentials that pass through T24
Validation.
Hook routines do not need a T24Context to connect to T24.
‘T’ types in T24 – T24Context
TAFJ
properties file
OUTPUT
Complex class in T24
No need to set/get related information in separate parameters.
For e.g. Customer PersonalInfo is made up of DOB, nationality and
residence
Practice 1.1 - Creating java project in Design Studio
File NewJava Project (ProjectName)
Setup - Configure Build Path – T24 Precompile
1
Configure Build Path – T24 Precompile
2
3
4
Configure Build Path - TAFJClient
Add [Link] available in
TAFJ_HOME/lib to the Java Build Path
This is needed to establish connection
and access the Datatypes
Create package
Java package is a mechanism for organizing Java classes into namespaces similar to
the T24 modules.
All classes go into a package
Right Click on your project New PackagePackageName.
Lesson 2. VERSION Hooks in
Java
T24 Extensibility in Java
T24 Extensibility
Routine Invocation Stages in the Template Life Cycle
Validation
.ID ID Routine .VALIDATE & Input
Routine
Check
Record & After
.RECORD .PROCESS Unauth
Auto Field
Routine Routine
Before Auth
and
.AUTHORISE
Authorisation
Routine
Fields in VERSION to which hooks can be attached
[Link] – hook to validate ID
[Link] – record level hook to check values or default values in
the record before the record is displayed to the user
[Link] – field level hook to default/modify values in field
before the record is displayed to the user
[Link] – field level hook to validate data in field
[Link] – record level hook to perform additional validations
[Link] – user exit that is called after unauthorised-record-
write.
[Link] - Invoked just prior to the final update of files at the
authorised stage of a transaction
[Link] – invoked after the final update of files at the authorised
stage of a transaction
VERSION HOOKS in T24
Version hooks are attached to a VERSION
[Link] has the following
methods
checkId
defaultFieldValues
defaultFieldValuesOnHotField
formatDealSlip
updateCoreRecord
updateLookupTable
validateRecord
Practice 2.1 – VERSION HOOK
Raise and error message when the [Link] and
[Link] are not same in a [Link] transaction
Solution
1. Create a class that extends RecordLifecycle and override the
validateRecord()
2. Create JAR, add in [Link] and restart jBoss
3. Make an entry in [Link]
4. Create a VERSION and attach the [Link] record to the Input routine to
validate if [Link] and [Link] are the same
Workflow
• Identify the EXIT point. Read Helptext to get the [Link] record ID
EXIT Point
field
• T24 Browser
• Get the hook method name to implement
[Link] • T24 Browser
record
• Find hook method signature and abstract class name
Javadoc • Javadoc
• Implement the hook
Code in
Java
• Design Studio
• Create [Link] record with SourceType=Method. Give hook method name,
class and package
[Link]
• T24 Browser
• Link hook method to [Link] using [Link]
Link • T24 Browser
Method
Determining the Superclass and Method – exit point
Identify the exit points in the version to attach hook routines. In this
case, [Link]
The helptext for the exit point field tells you whether or not a Java
routine can be attached.
Determining the Superclass and Method – Hook
method
View the [Link] record indicated in the helptext. This record gives the
name of the hook method to override in the Java implementation of
the exit point routine.
The hook component name indicates the Javadoc jar with
documentation on the method
Determining the Superclass and Method – Javadoc
Javadocs are packaged as
component wise jars in the [Link]
folder.
View the hook methods’
documentation by double clicking the
component Javadoc jar
EB_TemplateHook.[Link].
Select the package
[Link] and
the class RecordLifecycle. The
documentation provides a detailed
description of all the methods in the
class and its parameters.
Writing the Java Implementation
Raise and error message when the [Link] and
[Link] are not same in a [Link] transaction
Steps:
1. Create a class that extends RecordLifecycle and override the
validateRecord()
2. Create JAR, add in [Link] and restart jBoss
3. Make an entry in [Link]
4. Create a VERSION and attach the [Link] record to the Input routine to
validate if [Link] and [Link] are the same
Step 1 – Create class
Right Click on your Package New Class
Populated from the
T24 libraries that was
added to Java Build
Path
Step 2 – implement validateRecord
Step 3 – implement validateRecord
Step 3 – implement validateRecord
Step 4 – Create the JAR and add to [Link]
The .class file must be exported as a JAR and added to the [Link]
in JBoss
Step 5 – Create the JAR and add to [Link]
Add the JAR to the jBoss [Link] and restart jBoss
Step 6 – [Link]
Hooks are invoked when a transaction is validated/committed
Input Hooks are attached to the field [Link] in the VERSION
application
All hooks must have an entry in [Link]
Step 7 – Create/Modify version
Modify the version [Link],AC
[Link] record is
specified as the
[Link]
Launching the VERSION
Error is raised when [Link] is not equal to [Link]
Launching the VERSION
Error is not raised when [Link] equal to [Link]
Lesson 3. DEBUG Java code in
Design Studio
T24 Extensibility in Java
DEBUG the Java code
The Design Studio Java IDE provides many debugging tools and
views grouped in the Debug Perspective
To debug the program, define breakpoints. By adding breakpoints
in the source code we can specify where the execution of the
program should pause
To set breakpoints in the source code double click on the small left
margin in the source code editor.
DS uses eclipse standard for debugging
Step In : F5
Step Over : F6
Step Out : F7
Continue : F8
DEBUG the Java code
Remote Debug jBoss from Design Studio
Set JAVA_OPTS
For Windows
SET JAVA_OPTS=-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,
address=8787,server=y,suspend=n%JAVA_OPTS%
For Linux
JAVA_OPTS=“-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,
address=8787,server=y,suspend=n$JAVA_OPTS”
DEBUG the Java code
Create the DEBUG configuration
DEBUG the java code
Debugger view
Variables and expressions view
The current instruction pointer
Practice 3.1 – Version Hook CheckRec
Create a VERSION for ACCOUNT application that allows user to edit
records belonging to CATEGORY 1001 only Error must be raised for
ACCOUNT 74047 as it belongs to
Expected Output CATEGORY 6001
ACCOUNT in
CATEGORY
1001 is editable
Practice 3.2 – Version Hook for ID
Create a VERSION for the CUSTOMER that prefixes “99” to the ID given
by the user
Expected Output