Class CustomerEndpoint
java.lang.Object
com.broadleafcommerce.customer.web.endpoint.CustomerEndpoint
@FrameworkRestController
@FrameworkMapping("/customers")
@DataRouteByExample(Customer.class)
public class CustomerEndpoint
extends Object
Endpoint for management of
Customers
.- Author:
- Samarth Dhruva (samarthd)
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateCustomer
(com.broadleafcommerce.data.tracking.core.context.ContextInfo context, Customer customer) void
deleteCustomer
(com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String customerId) protected AccountMemberService<AccountMember>
protected CustomerHydrationService
protected CustomerService<Customer>
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, boolean hydrateRelatedEntities, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable 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) readAllCustomersIgnoreNarrowingHydrated
(com.broadleafcommerce.data.tracking.core.context.ContextInfo context, cz.jirutka.rsql.parser.ast.Node filters) org.springframework.data.domain.Page<AccountMember>
readCustomerAccounts
(com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String customerId, org.springframework.data.domain.Pageable page) readCustomerById
(com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String customerId) registerCustomerToAccount
(String customerId, RegisterAccountMemberRequest registerRequest, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) void
removeAccountMember
(String customerId, String accountMemberId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) replaceCustomer
(com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String customerId, Customer customer) void
setAccountMemberService
(AccountMemberService<AccountMember> accountMemberService) void
setCustomerHydrationService
(CustomerHydrationService customerHydrationService) updateAccountMember
(String customerId, String accountMemberId, UpdateAccountMemberRequest updateRequest, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
-
Field Details
-
BASE_URI
- See Also:
-
-
Constructor Details
-
CustomerEndpoint
-
-
Method Details
-
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) -
readAllCustomers
@Policy(permissionRoots="CUSTOMER", identityTypes=ADMIN) @FrameworkGetMapping("/search") public org.springframework.data.domain.Page<Customer> readAllCustomers(@ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, @RequestParam(value="query",required=false) String nameQuery, @RequestParam(required=false) boolean hydrateRelatedEntities, cz.jirutka.rsql.parser.ast.Node filters, @PageableDefault(size=50) org.springframework.data.domain.Pageable page) -
readCustomerById
-
createCustomer
-
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
-
readCustomerAccounts
@Policy(permissionRoots={"CUSTOMER","ACCOUNT_MEMBER"}, identityTypes=ADMIN) @FrameworkGetMapping("/{id}/accounts") public org.springframework.data.domain.Page<AccountMember> readCustomerAccounts(@ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @PathVariable("id") String customerId, @PageableDefault(size=50) org.springframework.data.domain.Pageable page) -
registerCustomerToAccount
@Policy(permissionRoots={"CUSTOMER","ACCOUNT_MEMBER"}, identityTypes=ADMIN) @FrameworkPostMapping(value="/{id}/accounts/members", consumes="application/json") public AccountMember registerCustomerToAccount(@PathVariable("id") String customerId, @RequestBody RegisterAccountMemberRequest registerRequest, @ContextOperation(CREATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) -
updateAccountMember
@Policy(permissionRoots={"CUSTOMER","ACCOUNT_MEMBER"}, identityTypes=ADMIN) @FrameworkMapping(value="/{id}/accounts/members/{accountMemberId}", consumes="application/json", method={PATCH,PUT}) public AccountMember updateAccountMember(@PathVariable("id") String customerId, @PathVariable("accountMemberId") String accountMemberId, @RequestBody UpdateAccountMemberRequest updateRequest, @ContextOperation(UPDATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) -
removeAccountMember
@Policy(permissionRoots={"CUSTOMER","ACCOUNT_MEMBER"}, identityTypes=ADMIN) @FrameworkDeleteMapping("/{id}/accounts/members/{accountMemberId}") public void removeAccountMember(@PathVariable("id") String customerId, @PathVariable("accountMemberId") String accountMemberId, @ContextOperation(DELETE) com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) -
getCustomerService
-
getCustomerHydrationService
-
setCustomerHydrationService
@Autowired public void setCustomerHydrationService(CustomerHydrationService customerHydrationService) -
getAccountMemberService
-
setAccountMemberService
@Autowired public void setAccountMemberService(AccountMemberService<AccountMember> accountMemberService)
-