Interface AccountMemberService<M extends AccountMember>
-
- All Superinterfaces:
com.broadleafcommerce.data.tracking.core.service.CrudEntityService<M>,com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService<M>
- All Known Implementing Classes:
DefaultAccountMemberService
public interface AccountMemberService<M extends AccountMember> extends com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService<M>Service API forAccountMembers. Supported byAccountMemberRepository.- Author:
- Chris Kittrell (ckittrell)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.springframework.data.domain.Page<M>readAllByAccountId(String accountId, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Reads all of the AccountMember relationships in the database associated with the given account context ID.MreadByIdAndAccountId(String id, String accountId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Finds theAccountMemberwhich has the given ID and parent account ID.MregisterAccountMember(String accountId, RegisterAccountMemberRequest registerAccountMemberRequest, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)MupdateAccountMember(String accountId, String accountMemberId, UpdateAccountMemberRequest updateRequest, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)-
Methods inherited from interface com.broadleafcommerce.data.tracking.core.service.CrudEntityService
create, createAll, createAllAllowingPartialSuccess, delete, readAll, readAll, readAll, readAllByContextId, readByContextId, replace, replaceAll, replaceAllAllowingPartialSuccess, update, updateAll, updateAllAllowingPartialSuccess, updateSort
-
-
-
-
Method Detail
-
readAllByAccountId
org.springframework.data.domain.Page<M> readAllByAccountId(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)
Reads all of the AccountMember relationships in the database associated with the given account context ID.- Parameters:
accountId- the account context ID to find the relationships forfilters- additional filters to apply in the query. Should beEmptyNodeif no additional filters should be applied.page- the requested page of results from the databasecontextInfo- the context to query within- Returns:
- the AccountMember relationships in the database that match the given account context ID
-
registerAccountMember
M registerAccountMember(String accountId, RegisterAccountMemberRequest registerAccountMemberRequest, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
Relates aCustomerwith theAccountidentified by theaccountId. If the customer cannot be found, then one is created.- Parameters:
accountId- Id of theAccountthat theRegisterAccountMemberRequest.customerRefshould be related toregisterAccountMemberRequest- The payload that describes the requested relationship between the customer & the accountcontext- The context of the user's request- Returns:
- The registered AccountMember
- Throws:
com.broadleafcommerce.data.tracking.core.exception.EntityMissingException- if the relatedAccount,Customer, orAccountRoleare not found
-
readByIdAndAccountId
M readByIdAndAccountId(String id, String accountId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Finds theAccountMemberwhich has the given ID and parent account ID.- Parameters:
id- the context ID of theAccountMemberaccountId- the context ID of the owningAccountcontextInfo- context surrounding customer and multitenant state- Returns:
- the account member that has the given ID and owning account ID
- Throws:
com.broadleafcommerce.data.tracking.core.exception.EntityMissingException- if no suchAccountMemberwas found
-
updateAccountMember
M updateAccountMember(String accountId, String accountMemberId, UpdateAccountMemberRequest updateRequest, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
- Parameters:
accountId- Id of theAccountin the relationshipaccountMemberId- Id of theAccountMemberthat is to be updatedupdateRequest- The payload that describes the requested changescontext- The context of the user's request- Returns:
-
-