Class CustomerAddressEndpoint
java.lang.Object
com.broadleafcommerce.customer.web.endpoint.CustomerAddressEndpoint
@FrameworkRestController
@FrameworkMapping("/customers/{customerId}/addresses")
@DataRouteByExample(Customer.class)
public class CustomerAddressEndpoint
extends Object
-
Constructor Summary
ConstructorDescriptionCustomerAddressEndpoint
(CustomerService<Customer> customerService, CustomerAddressService<CustomerAddress> customerAddressService, com.broadleafcommerce.common.extension.TypeFactory customerFactory) -
Method Summary
Modifier and TypeMethodDescriptionaddCustomerAddress
(String customerId, CustomerAddress customerAddress, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) protected CustomerRef
createCustomerRefFromCustomer
(Customer customer) protected Customer
ensureCustomerExistsAndReturn
(String customerId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) protected CustomerAddressService<CustomerAddress>
protected com.broadleafcommerce.common.extension.TypeFactory
protected CustomerService<Customer>
readCustomerAddress
(String customerId, String customerAddressId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) org.springframework.data.domain.Page<CustomerAddress>
readCustomerAddresses
(String customerId, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, cz.jirutka.rsql.parser.ast.Node filters) void
removeCustomerAddress
(String customerId, String customerAddressId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) replaceCustomerAddress
(String customerId, String customerAddressId, CustomerAddress customerAddress, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) protected org.apache.commons.lang3.tuple.Pair<Customer,
CustomerAddress> validateAndGetCustomerAndCustomerAddressRequest
(String customerId, String customerAddressId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
-
Constructor Details
-
CustomerAddressEndpoint
public CustomerAddressEndpoint(CustomerService<Customer> customerService, CustomerAddressService<CustomerAddress> customerAddressService, com.broadleafcommerce.common.extension.TypeFactory customerFactory)
-
-
Method Details
-
readCustomerAddresses
@Policy(permissionRoots={"CUSTOMER","CUSTOMER_PROFILE"}, identityTypes={ADMIN,OWNER}, ownerIdentifierParam=0) @FrameworkGetMapping public org.springframework.data.domain.Page<CustomerAddress> readCustomerAddresses(@PathVariable("customerId") String customerId, @PageableDefault org.springframework.data.domain.Pageable page, @ContextOperation(READ) com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, cz.jirutka.rsql.parser.ast.Node filters) -
addCustomerAddress
@Policy(permissionRoots={"CUSTOMER","CUSTOMER_PROFILE"}, identityTypes={ADMIN,OWNER}, ownerIdentifierParam=0) @FrameworkPostMapping(consumes="application/json") public CustomerAddress addCustomerAddress(@PathVariable("customerId") String customerId, @RequestBody CustomerAddress customerAddress, @ContextOperation(CREATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) -
readCustomerAddress
@Policy(permissionRoots={"CUSTOMER","CUSTOMER_PROFILE"}, identityTypes={ADMIN,OWNER}, ownerIdentifierParam=0) @FrameworkGetMapping("/{customerAddressId}") public CustomerAddress readCustomerAddress(@PathVariable("customerId") String customerId, @PathVariable("customerAddressId") String customerAddressId, @ContextOperation(READ) com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) -
replaceCustomerAddress
@Policy(permissionRoots={"CUSTOMER","CUSTOMER_PROFILE"}, identityTypes={ADMIN,OWNER}, ownerIdentifierParam=0) @FrameworkPutMapping(value="/{customerAddressId}", consumes="application/json") public CustomerAddress replaceCustomerAddress(@PathVariable("customerId") String customerId, @PathVariable("customerAddressId") String customerAddressId, @RequestBody CustomerAddress customerAddress, @ContextOperation(UPDATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) -
removeCustomerAddress
@Policy(permissionRoots={"CUSTOMER","CUSTOMER_PROFILE"}, identityTypes={ADMIN,OWNER}, ownerIdentifierParam=0) @FrameworkDeleteMapping("/{customerAddressId}") public void removeCustomerAddress(@PathVariable("customerId") String customerId, @PathVariable("customerAddressId") String customerAddressId, @ContextOperation(DELETE) com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) -
ensureCustomerExistsAndReturn
-
createCustomerRefFromCustomer
-
validateAndGetCustomerAndCustomerAddressRequest
protected org.apache.commons.lang3.tuple.Pair<Customer,CustomerAddress> validateAndGetCustomerAndCustomerAddressRequest(String customerId, String customerAddressId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) -
getCustomerService
-
getCustomerAddressService
-
getCustomerFactory
protected com.broadleafcommerce.common.extension.TypeFactory getCustomerFactory()
-