/** ******** */
  private B2BCustomerModel createB2BCustomerModel(final CustomerModel customer) {
    final B2BCustomerModel b2bCustomer = new B2BCustomerModel();

    b2bCustomer.setEmail(customer.getUid());
    b2bCustomer.setName(customer.getName());
    b2bCustomer.setTitle(customer.getTitle());
    b2bCustomer.setUid(customer.getUid());

    b2bCustomer.setDefaultB2BUnit(createB2BUnit());

    return b2bCustomer;
  }
コード例 #2
0
  @Override
  public Boolean get(final CustomerModel model) {
    if (model == null) {
      throw new IllegalArgumentException("Item model is required");
    }

    // Accelerator stores the email in the ID (uid) field
    final String email = model.getUid();
    return Boolean.valueOf(
        email != null && (email.endsWith("hybris.de") || email.endsWith("hybris.com")));
  }