NdsBeisEsb/src/main/java/com/northgateps/nds/beis/esb/registerexemption/RegisterPrsExemptionEmailAgentNotifier.java
/**
     * Sends email to landlord email address
     * 
     * @throws NdsApplicationException
     */
Sends email to landlord email address


Sends email to landlord email address
@Override
    public HashMap<String, Object> doEmailRequestProcess(RegisterPrsExemptionNdsRequest request,
            NdsSoapRequestAdapterExchangeProxy ndsExchange) {
        logger.info("Started setting parameters in register exemption by agent email template ");
        HashMap<String, Object> emailConfigMap = new HashMap<String, Object>();
        emailConfigMap.put("type", "RegisterAgentExemptionEmailTemplate");
        emailConfigMap.put("agentName", ndsExchange.getAnExchangeProperty(RegisterPrsExemptionLookupIdComponent.AGENT_NAME));
        emailConfigMap.put("agentAddress",ndsExchange.getAnExchangeProperty(RegisterPrsExemptionLookupIdComponent.AGENT_ADDRESS));
        emailConfigMap.put("maxValueForExemptionType", "£" + request.getMaxPenaltyValue());
        emailConfigMap.put("to",request.getRegisterPrsExemptionDetails().getExemptionDetails().getLandlordDetails().getEmailAddress());
        emailConfigMap.put("exemptionReference",request.getRegisterPrsExemptionDetails().getExemptionDetails().getReferenceId());
        emailConfigMap.put("exemptionType", request.getPwsText());
        emailConfigMap.put("propertyAddress",request.getRegisterPrsExemptionDetails().getExemptionDetails().getEpc().getPropertyAddress().getSingleLineAddressPostcode());
        emailConfigMap.put("emailTemplateFile", EMAIL_CONFIGURATION_FILE);
        emailConfigMap.put("emailLogo", EMAIL_LOGO);
        try {
            emailConfigMap.put("url", generateEmailBodyText(request.getTenant()));
        } catch (NoSuchElementException e) {
            logger.info("SignUrl in property is not used in the Application.");
        }
        logger.info("Successfully set parameters in register exemption by agent email template");
        return emailConfigMap;
    }
@ Override public HashMap < String , Object > doEmailRequestProcess ( RegisterPrsExemptionNdsRequest request , NdsSoapRequestAdapterExchangeProxy ndsExchange ) { logger . info ( "Started setting parameters in register exemption by agent email template " ) ; HashMap < String , Object > emailConfigMap = new HashMap < String , Object > ( ) ; emailConfigMap . put ( "type" , "RegisterAgentExemptionEmailTemplate" ) ; emailConfigMap . put ( "agentName" , ndsExchange . getAnExchangeProperty ( RegisterPrsExemptionLookupIdComponent . AGENT_NAME ) ) ; emailConfigMap . put ( "agentAddress" , ndsExchange . getAnExchangeProperty ( RegisterPrsExemptionLookupIdComponent . AGENT_ADDRESS ) ) ; emailConfigMap . put ( "maxValueForExemptionType" , "£"  equest. g etMaxPenaltyValue( ) ) ; emailConfigMap . put ( "to" , request . getRegisterPrsExemptionDetails ( ) . getExemptionDetails ( ) . getLandlordDetails ( ) . getEmailAddress ( ) ) ; emailConfigMap . put ( "exemptionReference" , request . getRegisterPrsExemptionDetails ( ) . getExemptionDetails ( ) . getReferenceId ( ) ) ; emailConfigMap . put ( "exemptionType" , request . getPwsText ( ) ) ; emailConfigMap . put ( "propertyAddress" , request . getRegisterPrsExemptionDetails ( ) . getExemptionDetails ( ) . getEpc ( ) . getPropertyAddress ( ) . getSingleLineAddressPostcode ( ) ) ; emailConfigMap . put ( "emailTemplateFile" , EMAIL_CONFIGURATION_FILE ) ; emailConfigMap . put ( "emailLogo" , EMAIL_LOGO ) ; try { emailConfigMap . put ( "url" , generateEmailBodyText ( request . getTenant ( ) ) ) ; } catch ( NoSuchElementException e ) { logger . info ( "SignUrl in property is not used in the Application." ) ; } logger . info ( "Successfully set parameters in register exemption by agent email template" ) ; return emailConfigMap ; }
Sends email to landlord email address
Sends email to landlord email address
// set parameters for agent exemption registration email