TSDK Overview

Download as pdf or txt
Download as pdf or txt
You are on page 1of 16

T24 Software Development Kit – User Guide – Overview

TEMENOS T24
Software Development Kit

TSDK - Overview

Information in this document is subject to change without notice.

No part of this document may be reproduced or transmitted in any form or by any means,
electronic or mechanical, for any purpose, without the express written permission of TEMENOS Holdings NV.
T24 Software Development Kit – Overview

Table of Content
Overview .................................................................................................................................................. 3 
Component Overview .......................................................................................................................... 3 
TSDK Foundation ................................................................................................................................ 4 
com.temenos.tsdk ............................................................................................................................ 4 
ClassLoader ..................................................................................................................................... 4 
com.temenos.tsdk.foundation .......................................................................................................... 4 
com.temenos.tsdk.validation ............................................................................................................ 6 
com.temenos.tsdk.exception ............................................................................................................ 6 
com.temenos.tsdk.routines .............................................................................................................. 6 
com.temenos.tsdk.utils ..................................................................................................................... 8 
Log4J Example................................................................................................................................. 8 
TSDK Application Classes ................................................................................................................... 8 
TSDK for server side APIs ................................................................................................................... 9 
TSDK for web server APIs ................................................................................................................. 10 
How it works .......................................................................................................................................... 11 
Instantiation of the T24 Validation class ............................................................................................ 11 
T24 Server API .................................................................................................................................. 12 
Web Server API ................................................................................................................................. 12 
Calling T24 business logic ................................................................................................................. 13 
TSDK FLOW DIAGRAMS .................................................................................................................. 13 
TSDK Sequence Diagram ................................................................................................................. 16 

TEMENOS T24 User Guide Page 2 of 16


T24 Software Development Kit – Overview

Overview
For many years, T24 has had an extensive range of API hooks to allow the customisation and
extension of T24’s business logic to meet the needs of an individual institution. However, historically
such code has had to be written in BASIC.
The T24 Software Development Kit, or TSDK, exposes T24 tables, records and methods to the Java
developer. It allows T24 server side API routines and web server API routines to be written using Java.
This document describes the installation of the TSDK, gives an overview of the structure and
philosophy and also contains details of how to create TSDK classes from local customisation.
The TSDK is currently available in Java, with support for Microsoft’s .Net platform via C# planned for
later releases.
It is assumed that the reader has a good working knowledge of both java and object oriented
programming. This document is not intended to teach either java or object oriented programming.

Component Overview
The TSDK is comprised of the following components:
Foundation Main interface to TSDK
Calls T24 business functions
Application Classes A set of created classes that represent the business objects
within T24, created for each GA release of T24.
Also allows the creation of TSDK classes that represent the
business objects that have been added to T24 by customisation
(refer to appendix)
Server side API Allows the TSDK server side APIs to be invoked by T24
Web server API Allows the TSDK web server APIs to be invoked by T24 browser,
and provides classes for the T24 browser to interpret and display
the results.
T24 Tables Allows the definition of server side API hooks

TEMENOS T24 User Guide Page 3 of 16


T24 Software Development Kit – Overview

TSDK Foundation
com.temenos.tsdk
The main package for the TSDK contains the main T24 class and associated exceptions. The
ClassLoader class is the main entry point to the T24 Routines that expose the T24 core basic classes.
By splitting up the main T24Routines class in to different classes, we are able to call methods from
each class, hence making them manageable. It contains subdirectories which will be discussed in the
sections below, with what the whole T24 Foundation is about. These subdirectories (packages)
include routines, validation, xml and utilities. The Classloader class provides access to contextual T24
data and allows access to the T24 business logic.

ClassLoader
This class is the first call when we enter TSDK arena. It takes the common data that is tagged up as
XML coming from a T24 routine. This XML document is a representation of the common area within
T24. This contains data like company information, user ID and the current contract.
In ClassLoader, we define the connection type, where a request is coming from. This is necessary
because, a validation could be at the web server or at the T24 server. The connection type helps
direct the request to the proper routine for validation. This is contained in the T24Context class.
Using the T24API, a Java interface, a validation routine instance is created passing the t24Common
and t24Routines objects to it.
The TSDK is supplied with full javadoc documentation that is shipped with the T24 Browser release.
Please refer to this for technical information and examples.

com.temenos.tsdk.foundation
The foundation classes provide native understanding of contract and enquiry processing. Methods on
the TSDK foundation classes expose functionality in T24 – allowing T24 routines to be invoked directly
from the TSDK – but controlling which core routines can be invoked from the API. Data access is also
provided.
The TSDK foundation classes are supplied with full javadoc documentation, however a brief overview
is provided here:
The two main classes provided by the TSDK foundation are the TContract and TEnquiry classes.
These represent contracts and enquiries in T24. The TContract base class from the TSDK foundation
is the backbone of the entire contract processing in both the Development Kit and the Web Services
offering, and is the ultimate super class for all the contract base generated WS classes, which is to
say that all the generated WS classes inherit from this contract class. The TEnquiry class provides the
same function for enquiry based Web Services.
The TContract class has methods and properties that are used by the TSDK created classes and the
TWS created classes to represent the underlying business objects from T24. Each TContract class
has an array of TProperty classes - the TProperty class is simply an object representation of a field on
a T24 application. It contains such information as: field name, field value pair (that handles
multivalues and subvalues), the minimum and maximum length of the field, whether the field is
mandatory or not, any related file, etc.

TEMENOS T24 User Guide Page 4 of 16


T24 Software Development Kit – Overview

The TSDK is supplied with full javadoc documentation, however a brief overview of a TProperty is
provided here:

Method Description
getName Returns the name of the field.
get / setValue Returns or sets the value of the field.
get / setMinimumLength Returns or sets the minimum length of the field.
get / setMaximumLength Returns or sets the maximum length of the field.
mandatory Returns whether the field is mandatory or not.
setMandatory Set whether the field is mandatory or not.
get / setRelatedFile Returns or sets the name of a related file of the field.
getOptions Returns a list of field values as defined in the T array.
get / setError Returns or sets an error against the field.
get / setEnrichment Returns or sets an enrichment against the field.

The TSelection field (name, operand and criteria) class provides the ability to add selection criteria the
TEnquiry class.

TEMENOS T24 User Guide Page 5 of 16


T24 Software Development Kit – Overview

com.temenos.tsdk.validation
This package is used for processing validation requests on contracts – both at the Web Server and
T24 Server levels.
The most important class in this package is the ValidationResponse class – used to communicate the
outcome of a TSDK invocation to the user.
The ValidationResponse class contains a list of the field properties, as well as a list of general errors
and messages, generated during the running of the user’s validation routine.

com.temenos.tsdk.exception
This package is used for handling all java exceptions from the TSDK.

com.temenos.tsdk.routines
This package contains T24 routines that make up the wrappers for T24 Server Basic routines. They
are sub divided into 7 main classes each with related methods.
The TSDK is supplied with full javadoc documentation, however a brief overview is provided here:

Below is the list of the breakdown of the classes within T24Routines.

TEMENOS T24 User Guide Page 6 of 16


T24 Software Development Kit – User Guide – Overview

T24 Routines

Date ExchangeRate FileHandling Generic Translation Validation

calculateCustomerRate clearFile
translateText
calculateExchangeRate deleteRecord
calculateExchangeRateLocal readCacheRecord
convertForeignCurrency readRecord
calculateYield
convertMiddleForeignCurrency writeRecord
convertCurrency
fieldNullCheck
calculateDate formatAmount
storeError
calculateDateAndFrequencyCode formatRate

convertJulianGregorianDate getLocalRefs

convertT24DateToInternalDate getSettlementDefaults
getStandardSelectionDetails
limitCheck
T24 Software Development Kit – User Guide – Overview

com.temenos.tsdk.utils
This package contains a logger utility class for debugging purposes. It contains a TLogger class which
is the main utility class for logging. TSDK uses Log4J, a Jakarta project for logging and debugging
purposes. This makes use of 2 jars T24log4j.jar and t24trace.jar.
This class handles all the log4j requests. It's a generic handler for all log4j calls implemented by the
tsdkTrace class.This class contains a WriteToLog method that we can use to pass the Log Level,
Callee program/function, message and arraylists. The WriteToLog will format the details in an
appropriate manner and call the corresponding t24Trace method to invoke the log4j logic.

Log4J Example

TSDK Application Classes


Each release of T24 is shipped with a new set of created classes that represent the business objects
within T24.
The created classes expose every table as a class with corresponding get and set methods (with full
support for multi and sub values). Developers can work with the java classes themselves – they do not
need to know the fields that are defined in the application – these are exposed as properties on the
classes. Here we can see the field names being exposed for the FOREX table:

And here we can see the corresponding getter methods of the actual properties:
T24 Software Development Kit – Overview

TSDK for server side APIs


T24 comes with an impressive list of server side API hooks that allow the T24 implementation to be
customised. These are defined from the table EB.API, and it is here that the language, package and
class or routine name of the API is defined.

Under the T24 architecture, these server side APIs are invoked at the T24 server under specified
conditions, and normally this is at commit time on a contract.

The server side API may be written in either java or basic. In order for the java routine to be invoked, it
must implement the correct interface – com.temenos.tsdk.T24.api.

TEMENOS T24 User Guide Page 9 of 16


T24 Software Development Kit – Overview

TSDK for web server APIs


EB.API is reused to define the web server APIs, by attaching the EB.API record to the WEB.VAL.RTN
field on VERSION. The fields that are used to trigger the web validate API are defined as having the
“WEB.VALIDATE” attribute.

The web server API must be written in java and must implement the Validator interface. Refer to the
javadoc for full details. Below is an example code fragment that validates a currency:

This class is supplied with the TSDK – CurrencyValidator .


The response that is sent to the client browser is governed by the ValidationResponse class. Again,
refer to the javadoc for details.

TEMENOS T24 User Guide Page 10 of 16


T24 Software Development Kit – Overview

How it works
As described earlier, the TSDK comprises of :-
• Foundation Classes
• Application Classes
• T24 Server APIs
• T24 Web Server APIs

In addition, a number of utilities applications exist to create and deploy the TSDK (e.g. WS.CREATE),
and a number of other BASIC routines to support the TSDK.
The following sections describe how the TSDK works.
Please refer to the sequence diagram in Appendix 1 for a diagrammatic view of the flow for Web
Server and T24 server validation.

Instantiation of the T24 Validation class


Whether the TSDK validation routine is being invoked from the web server or T24 server, the Java
validation class must be instantiated. In terms of Java, this is done using dynamic loading of the class
as the class name and package is not determined until runtime.
In our previous examples this would involve creating an instance of a ForexDefaultAccounts (for the
T24 server validation example) or ForexValidator (for the T24 web server validation example) object.
These classes do not have a constructor so a default constructor will be used and then the relevant
method called to invoke the validation routine. They have a runRoutine method which must be
implemented. The sections below describe the flow for web and T24 server APIs.

TEMENOS T24 User Guide Page 11 of 16


T24 Software Development Kit – Overview

T24 Server API


When validation is required at the T24 server layer, the following actions are performed :-
1. The T24 server code checks whether the VERSION record has any validation routines
attached.
2. If an EB.API Java routine has been attached to a field then EB.CALL.API is invoked.
3. EB.CALL.API will make a call to EB.CALLJ.PROG.JBASE to call the Java class routine.
4. EB.CALLJ.PROG.JBASE will create an XML document that represents the data in the T24
common area. This is done by calling TSDK.PRODUCE.COMMON.
5. EB.CALLJ.PROG.JBASE will the create an instance of the TSDK foundation class
ClassLoader. The name of the Java Validation routine will be passed as a parameter as well
as the XML common document.
6. The ‘getData’ routine of the ClassLoader is run. This is the start of TSDK processing.
7. The ClassLoader class inspects the validation routine name passed and creates an instance
of this class.
8. The ClassLoader class converts the XML common document in to a T24Common class which
holds the common data as Java objects.
9. The ClassLoader class creates an instance of the T24Routines class which allows access to
the T24 BASIC routines to read a record, date manipulations, etc.
10. The ClassLoader class then calls the ‘runRoutine‘ method of the validation class.
11. The user’s validation class validates the contract. This will include examining the current
contract stored in the passed T24Common object and creating a ValidationResponse object
which contains field data, errors and warnings pertaining to the contract data.
12. On return, the ClassLoader class coverts the ValidationResponse class in to an XML
document and returns it to the calling BASIC routine.
13. The validation response details are then displayed on the user’s T24 Browser screen.

Web Server API


When validation is required at the T24 web server layer, the following actions are performed :-
1. When a T24 Browser contract screen is built by the T24 server, any web validation routines for
fields are flagged accordingly.
2. When the user alters a web validate field, the validation is automatically run on the web server
in the background.
3. When the validate request reaches the web server, the parser converts the contract screen
data in to a TContract class and the field being validated in to a TProperty class.
4. The web server then interrogates the HTTP request for the validation class name and
package and instantiates an object of that class.
5. The web server then calls the ‘processRequest‘ method of the validation class.
6. The user’s validation class validates the contract. This will include examining the current
contract stored in the passed TContract object and creating a ValidationResponse object
which contains field data, errors and warnings pertaining to the contract data.
7. On return, the web server converts the ValidationResponse class in to an XML document and
returns it to the user’s Browser session.
8. The validation response details are then displayed on the user’s T24 Browser screen.

TEMENOS T24 User Guide Page 12 of 16


T24 Software Development Kit – Overview

Calling T24 business logic


The T24Common and T24Routines objects contain the data and API routines to allow full validation
using Java and BASIC routines.
The T24Common area contains information such as the contract being validated, field data (including
F, N , and T array data), the VERSION record, the SPF record, etc.
The T24Routines contain APIs to the standard set of T24 BASIC routines such as date manipulation
subroutines, file manipulation routines (e.g. read record, write record, etc). Please note that the
T24Routines methods will involve calls to the existing BASIC routines, therefore, thought must be
given to performance and bandwidth considerations when writing API routines. This is particularly true
when validating at the web server as calls will need to be made back to the T24 server platform.

The TSDK T24Routines class is supplied with full javadoc documentation, however a brief overview of
some of the routines are provided here:
Method Description Basic equivalent
readRecord Returns a contract object. F.READ
readCache Returns a contract object CACHE.READ
updateRecord Updates a row on a table. F.WRITE
deleteRecord Deletes a record from a file F.DELETE
clearFile Clears a file EB.CLEAR.FILE
daysDifference Calculates the difference in days CDD
between 2 dates
calculateDate Calculates forward or previous date CDT
from a start date
calculateExchangeRate Performs exchange rate calculations EXCHRATE

TSDK FLOW DIAGRAMS

Find below a flow diagrams showing what is happening.


During a validation process, calls can be made across 2 tiers of T24. It can be from the BASIC tier to
the Java tier and the response back to the BASIC tier, or an extra boundary will be crossed again. It
can go from the BASIC tier to JAVA, then to BASIC before the response is brought back. The two
diagrams do give the two ways that a validation routine is processed.

TEMENOS T24 User Guide Page 13 of 16


T24 Software Development Kit – Overview

BASIC – JAVA

TEMENOS T24 User Guide Page 14 of 16


T24 Software Development Kit – Overview

BASIC – JAVA – BASIC

TEMENOS T24 User Guide Page 15 of 16


T24 Software Development Kit – User Guide – Overview

TSDK Sequence Diagram

You might also like