/* * (non-Javadoc) * * @see de.hybris.platform.b2bacceleratorfacades.company.CompanyB2BCommerceFacade#getContactNumber(java.lang.String) */ @Override public String getContactNumber(final String uuid, final CustomerData customerData) { final EnergizerB2BCustomerModel model = userService.getUserForUID(uuid, EnergizerB2BCustomerModel.class); contactNumberPopulator.populate(model, customerData); return customerData.getContactNumber(); }
/* * (non-Javadoc) * * @see * com.energizer.facades.accounts.EnergizerCompanyB2BCommerceFacade#updateProfile(de.hybris.platform.commercefacades * .user.data.CustomerData) */ @SuppressWarnings("deprecation") @Override public void updateProfile(final CustomerData customerData) { try { validateDataBeforeUpdate(customerData); final String name = getCustomerNameStrategy() .getName(customerData.getFirstName(), customerData.getLastName()); final EnergizerB2BCustomerModel customer = (EnergizerB2BCustomerModel) getCurrentSessionCustomer(); customer.setOriginalUid(customerData.getDisplayUid()); customer.setContactNumber(customerData.getContactNumber()); customerAccountService.updateProfile( customer, customerData.getTitleCode(), name, customerData.getUid()); getModelService().save(customer); } catch (final DuplicateUidException e) { e.printStackTrace(); } }