Methods in CanvasPublishContext
Some of the important methods available in CanvasPublishContext class are as follows:
- getUserData – This method returns the following user details in JSON format:
- owningGCIF – Indicates the GCIF (ID of the entity) under which the logged-in user belongs to.
- currentGCIF – Indicates the GCIF (ID of the entity) for which the logged-in user is currently acting upon.
- userNumber – Indicates the internal number of the logged-in user.
- loginId – Indicates the log-on ID of the user.
- userType – Indicates the user type.
- firstName – Indicates the logged-in user's first name.
- middleName – Indicates the logged-in user' middle name.
- lastName – Indicates the logged-in user's last name.
- mobileNumber – Indicates the mobile number of the logged-in user.
- emailId – Indicates the email address of the logged-in user.
- customerSegmentCode – Indicates the customer segment code to which the logged-in user belongs.
- currentRoleId – Indicates the role ID of the logged-in user.
- authenticationType – Indicates the primary authentication type associated to the logged-in user.
getFormattedData – This method returns the request data as an object that will be published to the database. A sample output of this method is as follows:
[{ COLUMN_IDS=[BANK_NAME, BENE_ACC_NO, BENE_ADDRESS, BENE_CITY, BENE_ID, BENE_NAME, BRANCH_NAME, CURRENCY, PAYMENT_TYPE], TABLE_NAME=bene_data, VALUES=[GMT BANK, 3461903, 43 Hazrat Mahal Rd, Lucknow, 90032, Akash, Hazratganj, IND, Domestic Fund Transfer] }]
- getTransactionReferenceNo – This method returns the reference number of the current transaction, i.e., the reference number displayed after a library request is submitted by the initiator.