T24 L3 Java
July 11, 2024 | Author: Anonymous | Category: N/A
Short Description
Download T24 L3 Java...
Description
L3 JAVA
T24 Extensibility in Java
© 2010 Capgemini - All rights reserved
1
Why do we need
© 2010 Capgemini - All rights reserved
2
Java Extensibility can be used for
© 2010 Capgemini - All rights reserved
3
Pre-requisite
© 2010 Capgemini - All rights reserved
4
T24 Api and Hooks
© 2010 Capgemini - All rights reserved
5
T24 – T types
© 2010 Capgemini - All rights reserved
6
T24 – T Type -> TField
© 2010 Capgemini - All rights reserved
7
T24 – T type Structure
© 2010 Capgemini - All rights reserved
8
T24 – T Type -> Tvalidationresponse
© 2010 Capgemini - All rights reserved
9
T24 – Data Access
© 2010 Capgemini - All rights reserved
10
T Type ->T24 Context
© 2010 Capgemini - All rights reserved
11
Packages in L3 API
© 2010 Capgemini - All rights reserved
12
Dev Studio Setup
© 2010 Capgemini - All rights reserved
13
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
14
Create Java Project
© 2010 Capgemini - All rights reserved
15
Create java Project
© 2010 Capgemini - All rights reserved
16
Import T24 Libraries
© 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
Creating Package
© 2010 Capgemini - All rights reserved
22
Creating Package
© 2010 Capgemini - All rights reserved
23
Creating Class
© 2010 Capgemini - All rights reserved
24
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
25
Version Routines •
•
To create a version routine we need to extend a class called RecordLifeCycle in com.temenos.t24.api.hook.system packaged in EB.TemplateHook.jar This RecordLifeCycle class provides a dedicated method to a Particular Version Routine.
© 2010 Capgemini - All rights reserved
26
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 EB.API
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. • lastLiveRecord - The last live version of 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
28
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
29
Code for Input Routine
EB.API configuration for Input Routine
Version for Input Routine
Execution of Input Routine .
Workshop – Input Routine
Example 2: -
Check weather the category of the Account is Savings (6001) or not. If not throw an error that Category-Mismatch.
© 2010 Capgemini - All rights reserved
34
Code for Input Routine
© 2010 Capgemini - All rights reserved
35
EB.API configuration for Input Routine
© 2010 Capgemini - All rights reserved
36
Execution of Input Routine
© 2010 Capgemini - All rights reserved
37
Before Authorize Routine Why Before Authorize Routine? • To Perform Any operation after Commit • To perform Operation before Authorise.
When it will trigger? • During authorization of an INAU record. • Called before Version Auth routine is executed.
Method used for Before Authorization Routine The method used for this is • public void updateCoreRecord(String application, String recordId, TStructure record, TStructure lastLiveRecord, List versionNames, TBoolean isZeroAuth, List recordIds, List records) 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. • lastLiveRecord - The last live version of the record being processed - the implementaion must specify the record type. • versionNames - The Version names to be processed. • isZeroAuth - Returns true if it is Zero auth otherwise false. • recordIds - The id's of the record to be processed. • records - The records to be processed. Returns: • nothing © 2010 Capgemini - All rights reserved
39
Workshop for BeforeAuthRtn
To check whether the customer is precious or not by Mnemonic
VERSION
EB.API
Scenario 2
Check if the Customer who is Performing Transaction is Individual (means sector =1001) or not. If not throw an error that Please select an individual Customer.
© 2010 Capgemini - All rights reserved
48
Code For Before Auth Routine
© 2010 Capgemini - All rights reserved
49
© 2010 Capgemini - All rights reserved
50
Result The Customer Is not individual
© 2010 Capgemini - All rights reserved
51
Validation Routine
Why Validation Routine and When it will Trigger?
• To perform Field level validations. • To perform validation as soon as the data entered. • It will trigger when we click on validate or commit. Mandatory Prerequisites • Entry in EB.API
© 2010 Capgemini - All rights reserved
52
Method used for Validation Routine Method used for this is • public TValidationResponse validateField(String application, String recordId, String fieldData, TStructure record) Parameters: • application - The name of the application to which the record belongs. • recordId - The id of the record being processed. • fieldData - This is the latest value inputted in the field to which this interface has been attached to. • record - The record being processed.
Returns: • TValidationResponse - validationResponse - errors and enrichments will be processed at this stage.
© 2010 Capgemini - All rights reserved
53
Workshop – Validation Routine
Example 1:Validate the Transaction type field. If Transaction Type is AC, then ask user to enter the transaction type other than AC. Means This Version is not applicable for Account to Account transfer.
Code for Validation Routine
EB.API configuration for Validation Routine
Version for Validation Routine
Execution of Validation Routine
Scenario
Example 2: -
Create a version in FT with mandatory fields if the debit amount is greater than working balance then display error Message.
Code for scenario
© 2010 Capgemini - All rights reserved
60
Result
© 2010 Capgemini - All rights reserved
61
Check-Record Routine
When it is invoked? • It is invoked after the id is entered and validated • Gets invoked when the functions I(Input), D(Delete), A(Authorise) and R(Reverse) are used
What is the use? • Check record routine is used to alter field attributes or to default values into fields • Attached to the field CHECK.REC.RTN of the version Mandatory Prerequisites? • Check record routines need to have an entry in EB.API
© 2010 Capgemini - All rights reserved
62
Method used for Check-Record Routine The Method used for this is • public void defaultFieldValues(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. • lastLiveRecord - The last live version of the record being processed - the implementaion must specify the record type. Returns: • nothing
© 2010 Capgemini - All rights reserved
63
Workshop – Check Record Routine
Example 1: Create a check record routine for account application, check the currency matched or not . i) If matched view the existing record. ii) If not matched, throw error message “Currency Mismatched"
Code for Check Record Routine
EB.API configuration for Check Record Routine
Version for Check Record Routine
Execution of Check Record Routine
Workshop – Check Record Routine
Example 2: Create a check record routine for Customer application, If the New customer record - Account officer field is “equal to corporate banking account -2002”it should display the number of the customer records with 2002 category.
Code for Check record routine
EB.API Configuration
Version for Check Record Routine
Check Record Routine-Set Value
Why it is used? • Check record routine is used to alter field attributes or to default values into fields When it gets invoked? • It is invoked after the id is entered and validated • Gets invoked when the functions I(Input), D(Delete), A(Authorise) and R(Reverse) are used
© 2010 Capgemini - All rights reserved
73
Workshop – Check Record Routine-Set Value
Create an version which will display the Category, when the Check routine is called set the category value eg:1303.
Code for Check Record Routine-Set Value
EB.API configuration for Check Record Routine-Set Value
Version for Check Record Routine-Set Value
Execution of Check Record Routine-Set Value
ID ROUTINE
Why ID Routine? • To manipulate the id of the record. When it is called? • As soon as id of the record is entered • Before fetching the Record Where do we attach it? • Id routine field in the version Application • Prefix by ‘@’ symbol
Method used for ID Routine The method used for this is • public String checkId(String idNew)
Parameters: • idNew - The new id of the record being processed. Returns: • String - the validated @ID.
© 2010 Capgemini - All rights reserved
80
Traversal of ID Routine: Read only or predefined value of record is generated at the trigger of every account creation(new Record). The predefined record is accompanied with the Temenos profile. Validate ID field. Change the ID of an application with the combination of ‘TEMENOS’+App ID=ID
CODE FOR ID ROUTINE :
EB.API configuration for ID Routine
Version Design for ID Routine
EXCUTION OF ID ROUTINE
Enquiry Routine •
•
To create a version routine we need to extend a class called Enquiry in com.temenos.t24.api.hook.system packaged in EB.EnquiryHook.jar. This RecordLifeCycle class provides a dedicated method to a Particular Version Routine.
© 2010 Capgemini - All rights reserved
87
ENQUIRY BUILD ROUTINE
Why Build Routine? • To manipulate “Selection Criteria Box” • Used Before fetching the ID When it gets invoked? • Invoked after fixed selection • Before the dynamic conditions gets executed Where we attach Build Routine? • BuildRoutine.1 field of enquiry
Method used for Build Routine
The method used for this is • public List setFilterCriteria(String enquiryName, List filterCriteria) Parameters: • enquiryName - Id of the enquiry. For default enquiries (% enquiries) this will be '{applicationId} Default List'. (In T24 terms, this is ENQ.DATA) • filterCriteria - The list of FilterCriteria as entered by the user. (In T24 terms, this is ENQ.DATA) Returns: • List - A new list of filter criteria to be applied during record selection.
© 2010 Capgemini - All rights reserved
89
TRAVERSING Build Routine: • Before the selection of the id the Build routine is triggered , • Based on the CATEGORY of the user , • Output is launched on satisfying the condition.
Scenario Example : - 1 Create an enquiry that will display Customer Id, the Account Id and the respective working balance after accepting the category from the user. For category 1001 - Balance should be in the range 0 and 49999 For category 6001 - Balance should be in the range 50000 and 100000 For categories greater than 7000 - Balance should be in the range 100000 and 500000
© 2010 Capgemini - All rights reserved
91
CODE FOR BUILD ROUTINE
EB.API configuration for Build Routine
Enquiry Design for Build Routine
Enquiry Design of Build Routine
EXECUTION of Build Routine
Scenario Example : - 2 Create an enquiry that will display the Debit Account Id and the respective Debit amount transferred after accepting the debit currency from the user. For ‘USD’ the amount transferred is greater than 100 For ‘GBP’ the amount transferred is greater than 150 For currencies other than that amount transferred should be greater than 200
© 2010 Capgemini - All rights reserved
97
Code
© 2010 Capgemini - All rights reserved
98
EB.API
© 2010 Capgemini - All rights reserved
99
Result
© 2010 Capgemini - All rights reserved
100
Result
© 2010 Capgemini - All rights reserved
101
Result
© 2010 Capgemini - All rights reserved
102
Conversion Routine
Why Conversion Routine? • Format data prior to display. • Read another file and display value from it When it gets invoked? • Invoked after fetching required data • Before Displaying data in respective fields Where do we attach? • Attached to the conversion field • Prefixed with @ followed by space.
© 2010 Capgemini - All rights reserved
103
Method used for Conversion Routine The method used for this is • public String setValue(String value, String currentId, TStructure currentRecord, List filterCriteria) Parameters: • value - The initial value of the field. The new value should be returned. (In T24 terms, this is O.DATA) • currentId - The ID of the current record being processed. (In T24 terms, this is the 'ID' common variable) • currentRecord - The full record currently being processed by the enquiry. (In T24 terms, this is R.RECORD) • filterCriteria - The list of selection criteria entered by the user. (In T24 terms, this is fields from ENQ.SELECTION) Returns: • String - The new value to be displayed to the enquiry processing engine, to be displayed to the user or used in further calculations.
© 2010 Capgemini - All rights reserved
104
Workshop – Conversion Routine
Create an enquiry that will list the Account Numbers, Customer Numbers and their respective Working Balances. In case the Currency of the Account is in foreign currency, they have to be converted to local currency and then displayed
Code for Conversion Routine
EB.API configuration for Conversion Routine
Version for Conversion Routine
Execution of ConversionRoutine
NOFILE ENQUIRY Why NOFILE Enquiry? • ENQUIRY system works on a single file which is given in the FILE.NAME field of ENQUIRY application • To fetch data available in Multiple files, NOFILE Enquiry is the option • Nofile enquiry can be designed to fetch data from any number of files
Method used for NOFILE Enquiry
The method used is • public List setIds(List filterCriteria) Parameters: • filterCriteria - The list of selection criteria entered by the user. (In T24 terms, this is comes from D.FIELDS, D.RANGE.AND.VALUE and D.LOGICAL.OPERANDS) Returns: • List - The list of recordIds.
© 2010 Capgemini - All rights reserved
111
Workshop –No file Enquiry
Example : Create an ENQUIRY to display the consolidated balance for a CUSTOMER
No file Enquiry Routine
EB.API Configuration
Standard Selection
ENQUIRY
RESULT
Scenario
Example :- 2 Create a Enquiry which displays Customer Number, Account Number, Customer Mnemonic, Working balance
© 2010 Capgemini - All rights reserved
118
Code for No-File Routine
© 2010 Capgemini - All rights reserved
119
EB.API
© 2010 Capgemini - All rights reserved
120
STANDARD.SELECTION
© 2010 Capgemini - All rights reserved
121
Enquiry
© 2010 Capgemini - All rights reserved
122
result
© 2010 Capgemini - All rights reserved
123
What is T24 context? • T24Context is the way/approach to establish a connection between Java application and T24 system. •In simple , displaying the output in DS console itself as what we are showing in browser/classic mode.
Code for T24 context
Output will be displayed in console as below
Multi-threaded Routine •
•
To create a version routine we need to extend a class called serviceLifeCycle in com.temenos.t24.api.hook.system packaged in EB.ServiceHook.jar This ServiceLifeCycle class provides a dedicated method to a Particular Version Routine.
© 2010 Capgemini - All rights reserved
127
Workshop – Multithreaded Routine Create a multithreaded routine that updates the SHORT.NAME of all the CUSTOMER records as TEST + existing MNEMONIC
EB.API
PGM.FILE & BATCH
TSA.SERVICE
RESULTS:
Local Reference Fields
Why Local Reference Fields?
• • •
Not all fields required by a bank are available in a T24 application. Local Reference Field are User defined & totally customizable. Once created, can be reused in various applications.
© 2010 Capgemini - All rights reserved
134
Workshop For Local Reference Fields Check that Local Reference Field ‘HOBBIES’ is having ‘DANCE’ or not. If DANCE Then throw an error that Dance class already exists
© 2010 Capgemini - All rights reserved
135
Code for Local Reference Fields
© 2010 Capgemini - All rights reserved
136
EB.API
© 2010 Capgemini - All rights reserved
137
Result
© 2010 Capgemini - All rights reserved
138
Results If not Dancing
© 2010 Capgemini - All rights reserved
139
Results Record will get commit
© 2010 Capgemini - All rights reserved
140
Template Programming
Scenario-1
We can create a new application using EB.TABLE.DEFINITION. OVERRIDE must be raised if the phone / email is used by existing customer TABLE.NAME CUSTOMER.DEMO.EX PRODUCT ST FILE.TYPE H CLASSIFICATION CUS
Application: CUSTOMER.DEMO.EX
Field Name
Data Type
Name
A
Remarks
Phone
Raise override if this PHONE is available in CUSTOMER
Email
Raise override ifthis EMAIL is available in CUSTOMER
Generate the API for the local Application creation
Using Design Studio, we can generate the API for the APPLICATION created using EB.TABLE.DEFINITION we need a server project –to establish connection with T24 We need a models project –to import the application from T24
Creating the local template using EB.TABLE.DEFINITION Create a table using the EB.TABLE.DEFENITION
Create a data tool Project Creating the server project File New Project
Add Project Name, tafjHome, InsertDir & libDir
Toggle the project as a TAFJ project
Steps to Import the Local Application
Open the EB_Foundation and the check Local Project is import
Generate API for NEW Table
Create a New Java Project add the created ST_Customernew.jar
EB.API & Version
Results: Existing Customer
Displaying the Override as per the programe
Create a check record routine for the local application should display mail id by default
Add the Check Record routine using EB.TABLE.PROCEDURES
EB.API & PGM.FILE
Results
Session Scenario :- 1
By Using session variable print the userId of the user who have logged in.
© 2010 Capgemini - All rights reserved
164
Code for session variable
© 2010 Capgemini - All rights reserved
165
EB.API
© 2010 Capgemini - All rights reserved
166
Version
© 2010 Capgemini - All rights reserved
167
Result
© 2010 Capgemini - All rights reserved
168
Session Scenario :- 2
By Using session variable print the userDispoOfficer of the user who have logged in.
© 2010 Capgemini - All rights reserved
169
Code
© 2010 Capgemini - All rights reserved
170
EB.API
© 2010 Capgemini - All rights reserved
171
Version
© 2010 Capgemini - All rights reserved
172
Result
© 2010 Capgemini - All rights reserved
173
View more...
Comments