public class DefaultB2BApproverService extends java.lang.Object implements B2BApproverService<B2BCustomerModel>
B2BApproverService.| Constructor and Description |
|---|
DefaultB2BApproverService() |
| Modifier and Type | Method and Description |
|---|---|
B2BCustomerModel |
addApproverToCustomer(java.lang.String user,
java.lang.String approver)
Add an approver for a given user and return the updated
B2BCustomerModel object updated with approver
details |
B2BCustomerModel |
addApproverToUnit(java.lang.String unitUid,
java.lang.String approverUid)
Add approver to given unit
|
SearchPageData<B2BCustomerModel> |
findPagedApproversForUnitByGroupMembership(PageableData pageableData,
java.lang.String unitUid,
java.lang.String... usergroupUid)
Gets list of
SearchPageData B2BCustomerModel provided with required pagination parameters with
PageableData |
java.util.List<UserModel> |
getAccountManagerApprovers(PrincipalModel principal)
Gets the list of account manager approvers.
|
java.util.List<B2BCustomerModel> |
getAllActiveApprovers(B2BCustomerModel principal)
Gets all the active approvers for a given customer
|
java.util.List<B2BCustomerModel> |
getAllApprovers(B2BCustomerModel principal)
Gets the approvers assigned to principal(customer) directly or as approver groups including its parent unit and
all the units assigned to its parent up to the root unit.
|
protected B2BCommerceUnitService |
getB2bCommerceUnitService() |
protected B2BUnitService<B2BUnitModel,B2BCustomerModel> |
getB2bUnitService() |
protected java.util.List<B2BCustomerModel> |
getImmediateApprovers(PrincipalModel principal)
Gets the immediate approvers for either a B2BCustomer or B2BUnit (the principal) which also includes the members of
the principal's approver groups.
|
protected ModelService |
getModelService() |
protected PagedB2BCustomerDao<B2BCustomerModel> |
getPagedB2BCustomerDao() |
protected UserService |
getUserService() |
boolean |
isMemberOf(PrincipalGroupModel principal,
java.lang.String userGroupUid)
Deprecated.
Since 4.4.
|
protected java.lang.String |
principalListToUidString(java.util.List<B2BCustomerModel> allApprovers)
Gets the id's for a list of approvers.
|
B2BCustomerModel |
removeApproverFromCustomer(java.lang.String user,
java.lang.String approver)
Remove an approver for a given user and return the updated
B2BCustomerModel object updated with approver
details |
B2BCustomerModel |
removeApproverFromUnit(java.lang.String unitUid,
java.lang.String approverUid)
If an approver is a member of the B2BUnit remove b2bapprovergroup role, if the approver is a member of the current
branch of units the approver will be removed from
B2BUnitModel.getApprovers()
relationship |
void |
setB2bCommerceUnitService(B2BCommerceUnitService b2bCommerceUnitService) |
void |
setB2bUnitService(B2BUnitService<B2BUnitModel,B2BCustomerModel> b2bUnitService) |
void |
setModelService(ModelService modelService) |
void |
setPagedB2BCustomerDao(PagedB2BCustomerDao<B2BCustomerModel> pagedB2BCustomerDao) |
void |
setUserService(UserService userService) |
public java.util.List<B2BCustomerModel> getAllApprovers(B2BCustomerModel principal)
B2BApproverServicegetAllApprovers in interface B2BApproverService<B2BCustomerModel>principal - the principal (customer)public java.util.List<B2BCustomerModel> getAllActiveApprovers(B2BCustomerModel principal)
B2BApproverServicegetAllActiveApprovers in interface B2BApproverService<B2BCustomerModel>protected java.lang.String principalListToUidString(java.util.List<B2BCustomerModel> allApprovers)
allApprovers - protected java.util.List<B2BCustomerModel> getImmediateApprovers(PrincipalModel principal)
principal - the principalB2BCustomerModelpublic java.util.List<UserModel> getAccountManagerApprovers(PrincipalModel principal)
B2BApproverServicegetAccountManagerApprovers in interface B2BApproverService<B2BCustomerModel>principal - the principalpublic B2BCustomerModel addApproverToCustomer(java.lang.String user, java.lang.String approver)
B2BApproverServiceB2BCustomerModel object updated with approver
detailsaddApproverToCustomer in interface B2BApproverService<B2BCustomerModel>user - A unique identifier for B2BCustomerModel representing a userapprover - A unique identifier for B2BCustomerModel representing a approverB2BCustomerModel object updated with approverspublic B2BCustomerModel removeApproverFromCustomer(java.lang.String user, java.lang.String approver)
B2BApproverServiceB2BCustomerModel object updated with approver
detailsremoveApproverFromCustomer in interface B2BApproverService<B2BCustomerModel>user - A unique identifier for B2BCustomerModel representing a userapprover - A unique identifier for B2BCustomerModel representing a approverB2BCustomerModel object removed with approver@Deprecated public boolean isMemberOf(PrincipalGroupModel principal, java.lang.String userGroupUid)
B2BApproverServiceisMemberOf in interface B2BApproverService<B2BCustomerModel>principal - the principaluserGroupUid - the uid of the user group to check if the principal is a memeber of.public B2BCustomerModel addApproverToUnit(java.lang.String unitUid, java.lang.String approverUid)
B2BApproverServiceaddApproverToUnit in interface B2BApproverService<B2BCustomerModel>unitUid - A unique identifier for B2BUnitModelapproverUid - A unique identifier for B2BCustomerModel who is a approverB2BCustomerModel object after adding approver to customer.public B2BCustomerModel removeApproverFromUnit(java.lang.String unitUid, java.lang.String approverUid)
B2BApproverServiceB2BUnitModel.getApprovers()
relationshipremoveApproverFromUnit in interface B2BApproverService<B2BCustomerModel>unitUid - A unique identifier of B2BUnitModelapproverUid - A unique identifier of B2BCustomerModelB2BUnitModel.getApprovers()public SearchPageData<B2BCustomerModel> findPagedApproversForUnitByGroupMembership(PageableData pageableData, java.lang.String unitUid, java.lang.String... usergroupUid)
B2BApproverServiceSearchPageData B2BCustomerModel provided with required pagination parameters with
PageableDatafindPagedApproversForUnitByGroupMembership in interface B2BApproverService<B2BCustomerModel>pageableData - Pagination informationunitUid - A unique identifier of B2BUnitModelusergroupUid - A unique identifier of B2BUserGroupModelB2BCostCenterModel objectsprotected ModelService getModelService()
public void setModelService(ModelService modelService)
protected B2BUnitService<B2BUnitModel,B2BCustomerModel> getB2bUnitService()
public void setB2bUnitService(B2BUnitService<B2BUnitModel,B2BCustomerModel> b2bUnitService)
protected UserService getUserService()
public void setUserService(UserService userService)
protected B2BCommerceUnitService getB2bCommerceUnitService()
public void setB2bCommerceUnitService(B2BCommerceUnitService b2bCommerceUnitService)
protected PagedB2BCustomerDao<B2BCustomerModel> getPagedB2BCustomerDao()
public void setPagedB2BCustomerDao(PagedB2BCustomerDao<B2BCustomerModel> pagedB2BCustomerDao)
Copyright © 2018 SAP SE. All Rights Reserved.