}
return customerEditForm;
}
public CustomerAddressForm buildCustomerAddressForm(final RequestData requestData, final CustomerAddress customerAddress) throws Exception {
final CustomerAddressForm customerAddressForm = new CustomerAddressForm();
String languageCode = requestData.getMarketAreaLocalization().getCode();
if(languageCode.equals("en")) {
customerAddressForm.setCountryCode("US");
} else if(languageCode.equals("fr")) {
customerAddressForm.setCountryCode("FR");
} else if(languageCode.equals("de")) {
customerAddressForm.setCountryCode("DE");
} else if(languageCode.equals("es")) {
customerAddressForm.setCountryCode("ES");
} else if(languageCode.equals("it")) {
customerAddressForm.setCountryCode("IT");
} else if(languageCode.equals("nl")) {
customerAddressForm.setCountryCode("NL");
} else if(languageCode.equals("pt")) {
customerAddressForm.setCountryCode("PT");
}
if(customerAddress != null){
customerAddressForm.setAddressName(customerAddress.getAddressName());
customerAddressForm.setTitle(customerAddress.getTitle());
customerAddressForm.setLastname(customerAddress.getLastname());
customerAddressForm.setFirstname(customerAddress.getFirstname());
customerAddressForm.setAddress1(customerAddress.getAddress1());
customerAddressForm.setAddress2(customerAddress.getAddress2());
customerAddressForm.setAddressAdditionalInformation(customerAddress.getAddressAdditionalInformation());
customerAddressForm.setPostalCode(customerAddress.getPostalCode());
customerAddressForm.setCity(customerAddress.getCity());
customerAddressForm.setStateCode(customerAddress.getStateCode());
customerAddressForm.setAreaCode(customerAddress.getAreaCode());
customerAddressForm.setCountryCode(customerAddress.getCountryCode());
}
return customerAddressForm;
}