NdsBeisUi/src/main/java/com/northgateps/nds/beis/ui/controller/handler/AccountAddressHandler.java
/**
     * Helper function to create the SaveRegisteredAccountDetailsNdsRequest object based on
     * BeisRegistrationDetails
     * 
     * @param registrationDetails - Details as entered the user
     * @param languageCode - So messages can be returned different languages
     * @return
     */
Helper function to create the SaveRegisteredAccountDetailsNdsRequest object based on
BeisRegistrationDetails

@param registrationDetails - Details as entered the user
@param languageCode - So messages can be returned different languages
@return
Helper function to create the SaveRegisteredAccountDetailsNdsRequest object based on BeisRegistrationDetails @param registrationDetails - Details as entered the user @param languageCode - So messages can be returned different languages @return
private SaveRegisteredAccountDetailsNdsRequest createSaveRegisteredAccountDetailsNdsRequest(
            BeisRegistrationDetails registrationDetails, String languageCode,
            String tenant) {
        SaveRegisteredAccountDetailsNdsRequest request = new SaveRegisteredAccountDetailsNdsRequest();
        UpdateBeisRegistrationDetails updateRegistrationDetails = new UpdateBeisRegistrationDetails();
        BeisUpdateUserDetails updateUserDetails = new BeisUpdateUserDetails();
        updateRegistrationDetails.setAccountDetails(registrationDetails.getAccountDetails());
        updateRegistrationDetails.setContactAddress(registrationDetails.getContactAddress());
        if (registrationDetails.getUserDetails() != null) {
            updateUserDetails.setEmail(registrationDetails.getUserDetails().getEmail());
            updateUserDetails.setUsername(registrationDetails.getUserDetails().getUsername());
            request.setUsername(updateUserDetails.getUsername());           
            updateUserDetails.setUserType(registrationDetails.getUserDetails().getUserType());
        }
        if (updateRegistrationDetails.getAccountDetails() != null) {
            updateRegistrationDetails.getAccountDetails().setLanguageCode(languageCode);
        }
        updateRegistrationDetails.setUpdateUserDetails(updateUserDetails);
        request.setTenant(tenant);
        request.setRegisteredAccountDetails(updateRegistrationDetails);
        request.setPartiallyRegistered(true);
        return request;
    }
private SaveRegisteredAccountDetailsNdsRequest createSaveRegisteredAccountDetailsNdsRequest ( BeisRegistrationDetails registrationDetails , String languageCode , String tenant ) { SaveRegisteredAccountDetailsNdsRequest request = new SaveRegisteredAccountDetailsNdsRequest ( ) ; UpdateBeisRegistrationDetails updateRegistrationDetails = new UpdateBeisRegistrationDetails ( ) ; BeisUpdateUserDetails updateUserDetails = new BeisUpdateUserDetails ( ) ; updateRegistrationDetails . setAccountDetails ( registrationDetails . getAccountDetails ( ) ) ; updateRegistrationDetails . setContactAddress ( registrationDetails . getContactAddress ( ) ) ; if ( registrationDetails . getUserDetails ( ) != null ) { updateUserDetails . setEmail ( registrationDetails . getUserDetails ( ) . getEmail ( ) ) ; updateUserDetails . setUsername ( registrationDetails . getUserDetails ( ) . getUsername ( ) ) ; request . setUsername ( updateUserDetails . getUsername ( ) ) ; updateUserDetails . setUserType ( registrationDetails . getUserDetails ( ) . getUserType ( ) ) ; } if ( updateRegistrationDetails . getAccountDetails ( ) != null ) { updateRegistrationDetails . getAccountDetails ( ) . setLanguageCode ( languageCode ) ; } updateRegistrationDetails . setUpdateUserDetails ( updateUserDetails ) ; request . setTenant ( tenant ) ; request . setRegisteredAccountDetails ( updateRegistrationDetails ) ; request . setPartiallyRegistered ( true ) ; return request ; }
Helper function to create the SaveRegisteredAccountDetailsNdsRequest object based on
 BeisRegistrationDetails
Helper function to create the SaveRegisteredAccountDetailsNdsRequest object based on BeisRegistrationDetails
// Copy userDetails to update user details // Copy the details from registration to update registration