Class PartnerServiceManager


  • @Component
    public class PartnerServiceManager
    extends Object
    This class Partner Service Manager connects to partner service to validate and get the policy file for a given partnerID, partner api key and misp license key.
    Author:
    Nagarjuna
    • Constructor Detail

      • PartnerServiceManager

        public PartnerServiceManager()
    • Method Detail

      • validateAndGetPolicy

        public PartnerPolicyResponseDTO validateAndGetPolicy​(String partnerId,
                                                             String partner_api_key,
                                                             String misp_license_key,
                                                             boolean certificateNeeded,
                                                             String headerCertificateThumbprint,
                                                             boolean certValidationNeeded)
                                                      throws IdAuthenticationBusinessException
        Validate and get policy.
        Parameters:
        partnerId - the partner id
        partner_api_key - the partner api key
        misp_license_key - the misp license key
        certificateNeeded - the certificate needed
        Returns:
        the partner policy response DTO
        Throws:
        IdAuthenticationBusinessException - the id authentication business exception
      • handleApiKeyApproved

        public void handleApiKeyApproved​(io.mosip.kernel.core.websub.model.EventModel eventModel)
                                  throws com.fasterxml.jackson.core.JsonParseException,
                                         com.fasterxml.jackson.databind.JsonMappingException,
                                         IOException
        Handle api key approved.
        Parameters:
        eventModel - the event model
        Throws:
        com.fasterxml.jackson.core.JsonParseException - the json parse exception
        com.fasterxml.jackson.databind.JsonMappingException - the json mapping exception
        IOException - Signals that an I/O exception has occurred.
      • handleApiKeyUpdated

        public void handleApiKeyUpdated​(io.mosip.kernel.core.websub.model.EventModel eventModel)
                                 throws com.fasterxml.jackson.core.JsonParseException,
                                        com.fasterxml.jackson.databind.JsonMappingException,
                                        IOException
        Handle api key updated.
        Parameters:
        eventModel - the event model
        Throws:
        com.fasterxml.jackson.core.JsonParseException - the json parse exception
        com.fasterxml.jackson.databind.JsonMappingException - the json mapping exception
        IOException - Signals that an I/O exception has occurred.
      • updatePartnerData

        public void updatePartnerData​(io.mosip.kernel.core.websub.model.EventModel eventModel)
        Update partner data.
        Parameters:
        eventModel - the event model
      • updatePolicyData

        public void updatePolicyData​(io.mosip.kernel.core.websub.model.EventModel eventModel)
        Update policy data.
        Parameters:
        eventModel - the event model
      • updateMispLicenseData

        public void updateMispLicenseData​(io.mosip.kernel.core.websub.model.EventModel eventModel)
        Update misp license data.
        Parameters:
        eventModel - the event model