L3 JAVA
T24 Extensibility in Java
© 2010 Capgemini - All rights reserved 2
Why do we need
© 2010 Capgemini - All rights reserved 3
Java Extensibility can be used for
© 2010 Capgemini - All rights reserved 4
Pre-requisite
© 2010 Capgemini - All rights reserved 5
T24 Api and Hooks
© 2010 Capgemini - All rights reserved 6
T24 – T types
© 2010 Capgemini - All rights reserved 7
T24 – T Type -> TField
© 2010 Capgemini - All rights reserved 8
T24 – T type Structure
© 2010 Capgemini - All rights reserved 9
T24 – T Type -> Tvalidationresponse
© 2010 Capgemini - All rights reserved 10
T24 – Data Access
© 2010 Capgemini - All rights reserved 11
T Type ->T24 Context
© 2010 Capgemini - All rights reserved 12
Packages in L3 API
© 2010 Capgemini - All rights reserved 13
Dev Studio Setup
© 2010 Capgemini - All rights reserved 14
Prerequisites for L3 JAVA
• First we need to setup Design Studio in C:\dev\R19\DS.R19.1
• Create a Workspace in C:\dev
• Open Design Studio and create a Normal JAVA Project.
• Import the external jars from G:\Documents\t24lib\t24lib.
• Add an APPLIBS library files to the project by right click on project go to build
path -> configure build path -> add library -> user library -> APPLIBS.
© 2010 Capgemini - All rights reserved 15
Create Java Project
© 2010 Capgemini - All rights reserved 16
Create java Project
© 2010 Capgemini - All rights reserved 17
Import T24 Libraries
© 2010 Capgemini - All rights reserved 18
Import T24 Libraries
© 2010 Capgemini - All rights reserved 19
Import T24 Libraries
© 2010 Capgemini - All rights reserved 20
Import T24 Libraries
© 2010 Capgemini - All rights reserved 21
Import T24 Libraries
© 2010 Capgemini - All rights reserved 22
Creating Package
© 2010 Capgemini - All rights reserved 23
Creating Package
© 2010 Capgemini - All rights reserved 24
Creating Class
© 2010 Capgemini - All rights reserved 25
Objectives
By the end of this you will able to create
• Version Routines
• Enquiry Routines
• Multi-threaded routines
• No-File Enquires
• Local Reference fields
© 2010 Capgemini - All rights reserved 26
Version Routines
• To create a version routine we need to extend a class called RecordLifeCycle in
[Link] packaged in [Link]
• This RecordLifeCycle class provides a dedicated method to a Particular Version
Routine.
© 2010 Capgemini - All rights reserved 27
Input Routine
When it gets invoked?
• Gets invoked when committing a transaction
• All validations might have been completed
What is the use of Input Routine?
• Update local files
• Provide additional validation at input stage
• Provide override processing
Mandatory Prerequisites
• Entry in [Link]
Method Used for version Routine
The method used for this routine is
• public TValidationResponse validateRecord(String application, String recordId,
TStructure record, TStructure lastLiveRecord)
Parameters:
• application - The name of the application to which the record belongs.
• recordId - The id of the record being processed.
• record - The record being processed - the implementaion must specify the record
type.
Returns:
• TValidationResponse - validationResponse - errors and enrichments will be
processed at this stage.
© 2010 Capgemini - All rights reserved 29
Workshop – Input Routine
Example 1: -
Validate whether the Debit Currency and Credit Currency are same or not
In this Scenario We will compare the Both Debit and Credit Currency
If not Equal then we will throw an error message
© 2010 Capgemini - All rights reserved 30
Code for Input Routine
[Link] configuration for Input Routine
Version for Input Routine
OUTPUT
© 2010 Capgemini - All rights reserved 34