Methods in CanvasPublishContext

Some of the important methods available in CanvasPublishContext class are as follows:

  1. getUserData – This method returns the following user details in JSON format:

    1. owningGCIF – Indicates the GCIF (ID of the entity) under which the logged-in user belongs to.
    2. currentGCIF – Indicates the GCIF (ID of the entity) for which the logged-in user is currently acting upon.
    3. userNumber – Indicates the internal number of the logged-in user.
    4. loginId – Indicates the log-on ID of the user.
    5. userType – Indicates the user type.
    6. firstName – Indicates the logged-in user's first name.
    7. middleName – Indicates the logged-in user' middle name.
    8. lastName – Indicates the logged-in user's last name.
    9. mobileNumber – Indicates the mobile number of the logged-in user.
    10. emailId – Indicates the email address of the logged-in user.
    11. customerSegmentCode – Indicates the customer segment code to which the logged-in user belongs.
    12. currentRoleId – Indicates the role ID of the logged-in user.
    13. authenticationType – Indicates the primary authentication type associated to the logged-in user.

  2. 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]
    }]
  3. 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.