public PaymentInfoForm() { address.setPhonePrimary(new PhoneImpl()); address.setPhoneSecondary(new PhoneImpl()); address.setPhoneFax(new PhoneImpl()); }
public CustomerAddressForm() { address.setPhonePrimary(new PhoneImpl()); address.setPhoneSecondary(new PhoneImpl()); address.setPhoneFax(new PhoneImpl()); }
public void removeUnusedPhones(ShippingInfoForm form) { Address address = form.getAddress(); Phone primaryPhone = address.getPhonePrimary(); Phone secondaryPhone = address.getPhoneSecondary(); Phone faxPhone = address.getPhoneFax(); if ((primaryPhone != null) && (StringUtils.isEmpty(primaryPhone.getPhoneNumber()))) { address.setPhonePrimary(null); } if ((secondaryPhone != null) && (StringUtils.isEmpty(secondaryPhone.getPhoneNumber()))) { address.setPhoneSecondary(null); } if ((faxPhone != null) && (StringUtils.isEmpty(faxPhone.getPhoneNumber()))) { address.setPhoneFax(null); } }
public BillingInfoForm() { address.setPhonePrimary(new PhoneImpl()); address.setPhoneSecondary(new PhoneImpl()); address.setPhoneFax(new PhoneImpl()); }
public ShippingInfoForm() { address.setPhonePrimary(new PhoneImpl()); address.setPhoneSecondary(new PhoneImpl()); address.setPhoneFax(new PhoneImpl()); }
public void setAddress(Address address) { if (address.getPhonePrimary() == null) { address.setPhonePrimary(new PhoneImpl()); } if (address.getPhoneSecondary() == null) { address.setPhoneSecondary(new PhoneImpl()); } if (address.getPhoneFax() == null) { address.setPhoneFax(new PhoneImpl()); } this.address = address; }
public void removeUnusedPhones(CustomerAddressForm form) { if ((form.getAddress().getPhonePrimary() != null) && (StringUtils.isEmpty(form.getAddress().getPhonePrimary().getPhoneNumber()))) { form.getAddress().setPhonePrimary(null); } if ((form.getAddress().getPhoneSecondary() != null) && (StringUtils.isEmpty(form.getAddress().getPhoneSecondary().getPhoneNumber()))) { form.getAddress().setPhoneSecondary(null); } if ((form.getAddress().getPhoneFax() != null) && (StringUtils.isEmpty(form.getAddress().getPhoneFax().getPhoneNumber()))) { form.getAddress().setPhoneFax(null); } }
public String addCustomerPayment(HttpServletRequest request, Model model, PaymentInfoForm paymentInfoForm, BindingResult bindingResult) { Customer customer = CustomerState.getCustomer(); addressService.populateAddressISOCountrySub(paymentInfoForm.getAddress()); paymentInfoFormValidator.validate(paymentInfoForm, bindingResult); if (!bindingResult.hasErrors()) { if ((paymentInfoForm.getAddress().getPhonePrimary() != null) && (StringUtils.isEmpty(paymentInfoForm.getAddress().getPhonePrimary().getPhoneNumber()))) { paymentInfoForm.getAddress().setPhonePrimary(null); } if ((paymentInfoForm.getAddress().getPhoneSecondary() != null) && (StringUtils.isEmpty(paymentInfoForm.getAddress().getPhoneSecondary().getPhoneNumber()))) { paymentInfoForm.getAddress().setPhoneSecondary(null); } if ((paymentInfoForm.getAddress().getPhoneFax() != null) && (StringUtils.isEmpty(paymentInfoForm.getAddress().getPhoneFax().getPhoneNumber()))) { paymentInfoForm.getAddress().setPhoneFax(null); } savedPaymentService.addSavedPayment(customer, paymentInfoForm); return getCustomerPaymentRedirect(); } return getCustomerPaymentView(); }
public CheckoutForm() { shippingAddress = new AddressImpl(); billingAddress = new AddressImpl(); shippingAddress.setPhonePrimary(new PhoneImpl()); billingAddress.setPhonePrimary(new PhoneImpl()); shippingAddress.setPhoneSecondary(new PhoneImpl()); billingAddress.setPhoneSecondary(new PhoneImpl()); shippingAddress.setPhoneFax(new PhoneImpl()); billingAddress.setPhoneFax(new PhoneImpl()); shippingAddress.setIsoCountryAlpha2(new ISOCountryImpl()); billingAddress.setIsoCountryAlpha2(new ISOCountryImpl()); isSameAddress = true; /** * @deprecated - setCountry() and setState() on address have been deprecated in favor of ISO standardization. * Leaving here for legacy implementations. */ shippingAddress.setCountry(new CountryImpl()); billingAddress.setCountry(new CountryImpl()); shippingAddress.setState(new StateImpl()); billingAddress.setState(new StateImpl()); }
form.getAddress().setPhoneFax(null);
paymentForm.getAddress().setPhoneFax(null);
billingForm.getAddress().setPhoneFax(null);
shippingForm.getAddress().setPhoneFax(null);
cloned.setStreet(isStreet); cloned.setZipFour(zipFour); cloned.setPhoneFax(phoneFax); cloned.setPhonePrimary(phonePrimary); cloned.setPostalCode(postalCode);
dest.setPhonePrimary(phoneService.copyPhone(dest.getPhonePrimary(), orig.getPhonePrimary())); dest.setPhoneSecondary(phoneService.copyPhone(dest.getPhoneSecondary(), orig.getPhoneSecondary())); dest.setPhoneFax(phoneService.copyPhone(dest.getPhoneFax(), orig.getPhoneFax())); dest.setEmailAddress(orig.getEmailAddress()); dest.setBusiness(orig.isBusiness());