NdsBeisEsb/src/main/java/com/northgateps/nds/beis/esb/beisregistration/BeisRegistrationEmailAdapter.java
/**
     * Sets email configuration values
     * 
     * @return Hash Map Contains dynamic values to be replaced with place holders in Email Template at runtime
     */
Sets email configuration values

@return Hash Map Contains dynamic values to be replaced with place holders in Email Template at runtime
Sets email configuration values @return Hash Map Contains dynamic values to be replaced with place holders in Email Template at runtime
@Override
    public HashMap<String, Object> doEmailRequestProcess(BeisRegistrationNdsRequest ndsRequest,
            NdsSoapRequestAdapterExchangeProxy ndsExchange) {
        ArrayList<String> toList = new ArrayList<String>();
        toList.add(ndsRequest.getRegistrationDetails().getUserDetails().getEmail());
        ndsExchange.setRequestMessageBody(ndsRequest);
        ndsExchange.storeOriginalMessageAsString();
        HashMap<String, Object> emailConfigMap = new HashMap<String, Object>();
        emailConfigMap.put("type", "RegistrationEmailTemplate");
        emailConfigMap.put("language", "en");
        emailConfigMap.put("to", toList);
        emailConfigMap.put("name", ndsRequest.getRegistrationDetails().getUserDetails().getUsername());
        emailConfigMap.put("activationCode", ndsRequest.getRegistrationDetails().getActivationCode());
        emailConfigMap.put("registrationActivation",
                generateEmailBody(ndsRequest.getRegistrationDetails().getActivationCode(),
                        ndsRequest.getRegistrationDetails().getTenant()));
        emailConfigMap.put("activationText",
                generateEmailBodyActivationText(ndsRequest.getRegistrationDetails().getActivationCode(),
                        ndsRequest.getRegistrationDetails().getTenant()));
        emailConfigMap.put("emailTemplateFile",EMAIL_CONFIGURATION_FILE);
        emailConfigMap.put("emailLogo", EMAIL_LOGO);
        return emailConfigMap;
    }
@ Override public HashMap < String , Object > doEmailRequestProcess ( BeisRegistrationNdsRequest ndsRequest , NdsSoapRequestAdapterExchangeProxy ndsExchange ) { ArrayList < String > toList = new ArrayList < String > ( ) ; toList . add ( ndsRequest . getRegistrationDetails ( ) . getUserDetails ( ) . getEmail ( ) ) ; ndsExchange . setRequestMessageBody ( ndsRequest ) ; ndsExchange . storeOriginalMessageAsString ( ) ; HashMap < String , Object > emailConfigMap = new HashMap < String , Object > ( ) ; emailConfigMap . put ( "type" , "RegistrationEmailTemplate" ) ; emailConfigMap . put ( "language" , "en" ) ; emailConfigMap . put ( "to" , toList ) ; emailConfigMap . put ( "name" , ndsRequest . getRegistrationDetails ( ) . getUserDetails ( ) . getUsername ( ) ) ; emailConfigMap . put ( "activationCode" , ndsRequest . getRegistrationDetails ( ) . getActivationCode ( ) ) ; emailConfigMap . put ( "registrationActivation" , generateEmailBody ( ndsRequest . getRegistrationDetails ( ) . getActivationCode ( ) , ndsRequest . getRegistrationDetails ( ) . getTenant ( ) ) ) ; emailConfigMap . put ( "activationText" , generateEmailBodyActivationText ( ndsRequest . getRegistrationDetails ( ) . getActivationCode ( ) , ndsRequest . getRegistrationDetails ( ) . getTenant ( ) ) ) ; emailConfigMap . put ( "emailTemplateFile" , EMAIL_CONFIGURATION_FILE ) ; emailConfigMap . put ( "emailLogo" , EMAIL_LOGO ) ; return emailConfigMap ; }
Sets email configuration values
Sets email configuration values
// save the request with the activation code for later processing