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
Constructors Constructor Description CustomerAddressEndpoint(CustomerService<Customer> customerService, CustomerAddressService<CustomerAddress> customerAddressService, com.broadleafcommerce.common.extension.TypeFactory customerFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CustomerAddressaddCustomerAddress(String customerId, CustomerAddress customerAddress, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)protected CustomerRefcreateCustomerRefFromCustomer(Customer customer)protected CustomerensureCustomerExistsAndReturn(String customerId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)protected CustomerAddressService<CustomerAddress>getCustomerAddressService()protected com.broadleafcommerce.common.extension.TypeFactorygetCustomerFactory()protected CustomerService<Customer>getCustomerService()CustomerAddressreadCustomerAddress(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)voidremoveCustomerAddress(String customerId, String customerAddressId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)CustomerAddressreplaceCustomerAddress(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 Detail
-
CustomerAddressEndpoint
public CustomerAddressEndpoint(CustomerService<Customer> customerService, CustomerAddressService<CustomerAddress> customerAddressService, com.broadleafcommerce.common.extension.TypeFactory customerFactory)
-
-
Method Detail
-
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
protected Customer ensureCustomerExistsAndReturn(String customerId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
-
createCustomerRefFromCustomer
protected CustomerRef createCustomerRefFromCustomer(Customer customer)
-
validateAndGetCustomerAndCustomerAddressRequest
protected org.apache.commons.lang3.tuple.Pair<Customer,CustomerAddress> validateAndGetCustomerAndCustomerAddressRequest(String customerId, String customerAddressId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
-
getCustomerService
protected CustomerService<Customer> getCustomerService()
-
getCustomerAddressService
protected CustomerAddressService<CustomerAddress> getCustomerAddressService()
-
getCustomerFactory
protected com.broadleafcommerce.common.extension.TypeFactory getCustomerFactory()
-
-