Class CustomerEndpoint
- java.lang.Object
 - 
- com.broadleafcommerce.customer.web.endpoint.CustomerEndpoint
 
 
- 
@FrameworkRestController @FrameworkMapping("/customers") @DataRouteByExample(Customer.class) public class CustomerEndpoint extends ObjectEndpoint for management ofCustomers.- Author:
 - Samarth Dhruva (samarthd)
 
 
- 
- 
Constructor Summary
Constructors Constructor Description CustomerEndpoint(CustomerService<Customer> customerService) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CustomercreateCustomer(com.broadleafcommerce.data.tracking.core.context.ContextInfo context, Customer customer)voiddeleteCustomer(com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String customerId)protected CustomerService<Customer>getCustomerService()List<String>readAllCustomerIdsIgnoreNarrowing(com.broadleafcommerce.data.tracking.core.context.ContextInfo context, cz.jirutka.rsql.parser.ast.Node filters, int page)org.springframework.data.domain.Page<Customer>readAllCustomers(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, String nameQuery, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page)List<Customer>readAllCustomersIgnoreNarrowingHydrated(com.broadleafcommerce.data.tracking.core.context.ContextInfo context, cz.jirutka.rsql.parser.ast.Node filters)CustomerreadCustomerById(com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String customerId)CustomerreplaceCustomer(com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String customerId, Customer customer) 
 - 
 
- 
- 
Field Detail
- 
BASE_URI
public static final String BASE_URI
- See Also:
 - Constant Field Values
 
 
 - 
 
- 
Constructor Detail
- 
CustomerEndpoint
public CustomerEndpoint(CustomerService<Customer> customerService)
 
 - 
 
- 
Method Detail
- 
readAllCustomers
@Policy(permissionRoots="CUSTOMER", identityTypes=ADMIN) @FrameworkGetMapping public org.springframework.data.domain.Page<Customer> readAllCustomers(@ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, @RequestParam(value="q",required=false) String nameQuery, cz.jirutka.rsql.parser.ast.Node filters, @PageableDefault(size=50) org.springframework.data.domain.Pageable page) 
- 
readCustomerById
@Policy(permissionRoots={"CUSTOMER","CUSTOMER_PROFILE"}, identityTypes={ADMIN,OWNER}) @FrameworkGetMapping("/{id}") public Customer readCustomerById(@ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @PathVariable("id") String customerId) 
- 
createCustomer
@Policy(permissionRoots="CUSTOMER", identityTypes=ADMIN) @FrameworkPostMapping(consumes="application/json") public Customer createCustomer(@ContextOperation(CREATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @RequestBody Customer customer) 
- 
replaceCustomer
@Policy(permissionRoots={"CUSTOMER","CUSTOMER_PROFILE"}, identityTypes={ADMIN,OWNER}, ownerIdentifierParam=1) @FrameworkPutMapping(value="/{id}", consumes="application/json") public Customer replaceCustomer(@ContextOperation(UPDATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @PathVariable("id") String customerId, @RequestBody Customer customer) 
- 
deleteCustomer
@Policy(permissionRoots="CUSTOMER") @FrameworkDeleteMapping("/{id}") public void deleteCustomer(@ContextOperation(DELETE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @PathVariable("id") String customerId) 
- 
readAllCustomerIdsIgnoreNarrowing
@Policy(permissionRoots="CUSTOMER_IGNORE_NARROWING") @FrameworkGetMapping("/ignore-narrowing/ids") public List<String> readAllCustomerIdsIgnoreNarrowing(@ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo context, cz.jirutka.rsql.parser.ast.Node filters, @RequestParam("size") int page) 
- 
readAllCustomersIgnoreNarrowingHydrated
@FrameworkGetMapping("/ignore-narrowing") @Policy(permissionRoots="CUSTOMER_IGNORE_NARROWING") public List<Customer> readAllCustomersIgnoreNarrowingHydrated(@ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo context, cz.jirutka.rsql.parser.ast.Node filters) 
- 
getCustomerService
protected CustomerService<Customer> getCustomerService()
 
 - 
 
 -