Interface CustomerAccountService<A extends Account,M extends AccountMember>
-
- All Known Implementing Classes:
DefaultCustomerAccountService
public interface CustomerAccountService<A extends Account,M extends AccountMember>Service for customer facing interactions involving reading account members and accounts. Additional validation is performed in this service to ensure account related data may only be read if the user is a member of that account.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddeleteAccountMember(String accountId, String memberId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)MreadAccountMember(String accountId, String memberId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)org.springframework.data.domain.Page<M>readAccountMembers(String accountId, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Read theAccountMembersfor a specificAccountby id.List<A>readMyAccounts(int childAccountDepth, boolean filterParents, cz.jirutka.rsql.parser.ast.Node filters, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Reads the currently logged in user'sAccounts.MupdateAccountMember(String accountId, String memberId, UpdateAccountMemberRequest accountMember, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
-
-
-
Method Detail
-
readAccountMembers
org.springframework.data.domain.Page<M> readAccountMembers(String accountId, @Nullable cz.jirutka.rsql.parser.ast.Node filters, @Nullable org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Read theAccountMembersfor a specificAccountby id.- Parameters:
accountId- Id of the parent accountfilters- RSQL filterspage- Pagination infocontextInfo- Additional multitenant and sandbox info- Returns:
- The
AccountMembersfor a specificAccountby id.
-
readAccountMember
M readAccountMember(String accountId, String memberId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
-
updateAccountMember
M updateAccountMember(String accountId, String memberId, UpdateAccountMemberRequest accountMember, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
-
deleteAccountMember
void deleteAccountMember(String accountId, String memberId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
-
readMyAccounts
List<A> readMyAccounts(int childAccountDepth, boolean filterParents, @Nullable cz.jirutka.rsql.parser.ast.Node filters, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Reads the currently logged in user'sAccounts. SetexcludeAccountsWithInactiveParenttotrueto filter out accounts that have a disabled parent account.- Parameters:
childAccountDepth- How many levels deep of the account hierarchy of the accounts matchingidsto include in the results, e.g., how many levels of child accounts to include.-1indicates no limit.0indicates no child accounts.Default is
0.filterParents- If true, the returned list will include only accounts with active parent accounts.filters- An RSQL filter used to narrow query results. May beEmptyNodeif no filters should be applied.contextInfo- Additional multitenant and sandbox info- Returns:
- The currently logged in user's
Accounts.
-
-