Class AccountEndpoint
- java.lang.Object
-
- com.broadleafcommerce.customer.web.endpoint.AccountEndpoint
-
@FrameworkRestController @FrameworkMapping("/accounts") @DataRouteByExample(Account.class) public class AccountEndpoint extends Object
Endpoint for management ofAccounts
.- Author:
- Chris Kittrell (ckittrell)
-
-
Constructor Summary
Constructors Constructor Description AccountEndpoint(AccountService<Account> accountService, AccountMemberService<AccountMember> accountMemberService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Account
createAccount(com.broadleafcommerce.data.tracking.core.context.ContextInfo context, Account account)
void
deleteAccount(String accountId, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
protected AccountMemberService<AccountMember>
getAccountMemberService()
protected AccountService<Account>
getAccountService()
protected org.springframework.data.domain.Page<Account>
hydrateParentAccounts(org.springframework.data.domain.Page<Account> accounts, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Account
readAccountById(String accountId, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
protected Map<String,AccountRef>
readAccountMap(Collection<String> ids, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
List<Account>
readAccountsForCustomer(String customerId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
org.springframework.data.domain.Page<Account>
readAllAccounts(cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Account
replaceAccount(String accountId, Account account, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
-
-
-
Field Detail
-
BASE_URI
public static final String BASE_URI
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AccountEndpoint
public AccountEndpoint(AccountService<Account> accountService, AccountMemberService<AccountMember> accountMemberService)
-
-
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)
-
readAccountMap
protected Map<String,AccountRef> readAccountMap(Collection<String> ids, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
-
getAccountService
protected AccountService<Account> getAccountService()
-
getAccountMemberService
protected AccountMemberService<AccountMember> getAccountMemberService()
-
-