Class OrderGenerateAddressServiceImpl
java.lang.Object
ch.tocco.nice2.optional.order.spi.OrderGenerateAddressServiceImpl
- All Implemented Interfaces:
OrderGenerateAddressService
@Component
public class OrderGenerateAddressServiceImpl
extends Object
implements OrderGenerateAddressService
-
Constructor Summary
ConstructorDescriptionOrderGenerateAddressServiceImpl
(QueryBuilderFactory queryBuilderFactory, AddressService addressService, L10N l10N) -
Method Summary
Modifier and TypeMethodDescriptiongetBillingAddressBlock
(Entity order) creates the billing address block for a given ordergetBillingAddressBlock
(Entity order, @Nullable Entity user) getBillingAddressBlockForUser
(Entity order, Entity user) creates the billing address block for a given user.getDeliveryAddressBlock
(Entity order) creates the delivery address block for a given ordergetDeliveryAddressBlock
(Entity order, @Nullable Entity user) void
setBillingAddressBlock
(Entity order, Entity user) set the BillingAddressBlock for a given order and uservoid
setDeliveryAddressBlock
(Entity order, Entity user) set the DeliveryAddressBlock for a given order and uservoid
updateAddressBlockFields
(Entity order) updates the billing and delivery address blocks for a given ordervoid
updateEmailAddress
(Entity order) updates the mail for a given order
-
Constructor Details
-
OrderGenerateAddressServiceImpl
public OrderGenerateAddressServiceImpl(QueryBuilderFactory queryBuilderFactory, AddressService addressService, L10N l10N)
-
-
Method Details
-
getBillingAddressBlock
Description copied from interface:OrderGenerateAddressService
creates the billing address block for a given order- Specified by:
getBillingAddressBlock
in interfaceOrderGenerateAddressService
- Returns:
Optional
of the billing address block. AnOptional.empty()
will be returned if there's no billing addressEntity
on order or the user
-
getBillingAddressBlockForUser
Description copied from interface:OrderGenerateAddressService
creates the billing address block for a given user. The order is only used for the billing address addition.- Specified by:
getBillingAddressBlockForUser
in interfaceOrderGenerateAddressService
- Returns:
Optional
of the billing address block. AnOptional.empty()
will be returned if there's no billing addressEntity
on the user
-
getBillingAddressBlock
-
getDeliveryAddressBlock
Description copied from interface:OrderGenerateAddressService
creates the delivery address block for a given order- Specified by:
getDeliveryAddressBlock
in interfaceOrderGenerateAddressService
- Returns:
- the delivery address block
-
getDeliveryAddressBlock
-
updateAddressBlockFields
Description copied from interface:OrderGenerateAddressService
updates the billing and delivery address blocks for a given order- Specified by:
updateAddressBlockFields
in interfaceOrderGenerateAddressService
-
setBillingAddressBlock
Description copied from interface:OrderGenerateAddressService
set the BillingAddressBlock for a given order and user- Specified by:
setBillingAddressBlock
in interfaceOrderGenerateAddressService
-
setDeliveryAddressBlock
Description copied from interface:OrderGenerateAddressService
set the DeliveryAddressBlock for a given order and user- Specified by:
setDeliveryAddressBlock
in interfaceOrderGenerateAddressService
-
updateEmailAddress
Description copied from interface:OrderGenerateAddressService
updates the mail for a given order- Specified by:
updateEmailAddress
in interfaceOrderGenerateAddressService
-