T24 Software Development Kit - User Guide - Overview
T24 Software Development Kit - User Guide - Overview
T24 Software Development Kit - User Guide - Overview
TEMENOS T24
Software Development Kit
TSDK - Overview
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
Introduction.............................................................................................................................................. 3
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
Introduction
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.
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
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.
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.
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:
T24 Routines
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
And here we can see the corresponding getter methods of the actual properties:
T24 Software Development Kit – Overview
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.
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:
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.
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