Class AccountEndpoint


  • @FrameworkRestController
    @FrameworkMapping("/accounts")
    @DataRouteByExample(Account.class)
    public class AccountEndpoint
    extends Object
    Endpoint for management of Accounts.
    Author:
    Chris Kittrell (ckittrell)
    • Method Detail

      • readAllAccounts

        @Policy(permissionRoots="ACCOUNT")
        @FrameworkGetMapping
        public org.springframework.data.domain.Page<Account> readAllAccounts​(cz.jirutka.rsql.parser.ast.Node filters,
                                                                             @PageableDefault(size=50)
                                                                             org.springframework.data.domain.Pageable page,
                                                                             @ContextOperation
                                                                             com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      • readAccountById

        @Policy(permissionRoots="ACCOUNT")
        @FrameworkGetMapping("/{id}")
        public Account readAccountById​(@PathVariable("id")
                                       String accountId,
                                       @ContextOperation
                                       com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      • createAccount

        @Policy(permissionRoots="ACCOUNT")
        @FrameworkPostMapping(consumes="application/json")
        public Account createAccount​(@ContextOperation(CREATE)
                                     com.broadleafcommerce.data.tracking.core.context.ContextInfo context,
                                     @RequestBody
                                     Account account)
      • replaceAccount

        @Policy(permissionRoots="ACCOUNT")
        @FrameworkPutMapping(value="/{id}",
                             consumes="application/json")
        public Account replaceAccount​(@PathVariable("id")
                                      String accountId,
                                      @RequestBody
                                      Account account,
                                      @ContextOperation(UPDATE)
                                      com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      • deleteAccount

        @Policy(permissionRoots="ACCOUNT")
        @FrameworkDeleteMapping("/{id}")
        public void deleteAccount​(@PathVariable("id")
                                  String accountId,
                                  @ContextOperation(DELETE)
                                  com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      • readAccountsForCustomer

        @Policy(permissionRoots="CUSTOMER")
        @FrameworkGetMapping("/customer/{customerId}")
        public List<Account> readAccountsForCustomer​(@PathVariable("customerId")
                                                     String customerId,
                                                     @ContextOperation(READ)
                                                     com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      • hydrateParentAccounts

        protected org.springframework.data.domain.Page<Account> hydrateParentAccounts​(org.springframework.data.domain.Page<Account> accounts,
                                                                                      com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)