Package de.hybris.platform.b2b.services
Interface B2BApproverService<T>
- Type Parameters:
T- the principal (customer)
- All Known Implementing Classes:
DefaultB2BApproverService
public interface B2BApproverService<T>
The Interface B2BApproverService. Service is responsible for fetching approvers related to a B2BCustomer.
- Spring Bean ID:
- b2bApproverService
-
Method Summary
Modifier and TypeMethodDescriptionaddApproverToCustomer(String user, String approver) Add an approver for a given user and return the updatedB2BCustomerModelobject updated with approver detailsaddApproverToUnit(String unitId, String approverId) Add approver to given unitfindPagedApproversForUnitByGroupMembership(PageableData pageableData, String unitUid, String... userGroupUid) Gets list ofSearchPageDataB2BCustomerModelprovided with required pagination parameters withPageableDatagetAccountManagerApprovers(PrincipalModel principal) Gets the list of account manager approvers.getAllActiveApprovers(B2BCustomerModel principal) Gets all the active approvers for a given customergetAllApprovers(T 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.booleanisMemberOf(PrincipalGroupModel principal, String userGroupUid) Deprecated, for removal: This API element is subject to removal in a future version.Since 4.4.removeApproverFromCustomer(String user, String approver) Remove an approver for a given user and return the updatedB2BCustomerModelobject updated with approver detailsremoveApproverFromUnit(String unitUid, 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 fromB2BUnitModel.getApprovers()relationship
-
Method Details
-
getAllApprovers
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.- Parameters:
principal- the principal (customer)- Returns:
- A collection of approvers
-
isMemberOf
@Deprecated(since="4.4", forRemoval=true) boolean isMemberOf(PrincipalGroupModel principal, String userGroupUid) Deprecated, for removal: This API element is subject to removal in a future version.Checks if the principal is a member of the user group.- Parameters:
principal- the principaluserGroupUid- the uid of the user group to check if the principal is a memeber of.- Returns:
- true, if is member of
-
getAccountManagerApprovers
Gets the list of account manager approvers.- Parameters:
principal- the principal- Returns:
- the approvers
-
getAllActiveApprovers
Gets all the active approvers for a given customer- Parameters:
principal-- Returns:
- list of approvers
-
addApproverToCustomer
Add an approver for a given user and return the updatedB2BCustomerModelobject updated with approver details- Parameters:
user- A unique identifier forB2BCustomerModelrepresenting a userapprover- A unique identifier forB2BCustomerModelrepresenting a approver- Returns:
- Updated
B2BCustomerModelobject updated with approvers
-
removeApproverFromCustomer
Remove an approver for a given user and return the updatedB2BCustomerModelobject updated with approver details- Parameters:
user- A unique identifier forB2BCustomerModelrepresenting a userapprover- A unique identifier forB2BCustomerModelrepresenting a approver- Returns:
- Updated
B2BCustomerModelobject removed with approver
-
addApproverToUnit
Add approver to given unit- Parameters:
unitId- A unique identifier forB2BUnitModelapproverId- A unique identifier forB2BCustomerModelwho is a approver- Returns:
- Updated
B2BCustomerModelobject after adding approver to customer.
-
removeApproverFromUnit
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 fromB2BUnitModel.getApprovers()relationship- Parameters:
unitUid- A unique identifier ofB2BUnitModelapproverUid- A unique identifier ofB2BCustomerModel- Returns:
- An approver who was removed from a
B2BUnitModel.getApprovers()
-
findPagedApproversForUnitByGroupMembership
SearchPageData<B2BCustomerModel> findPagedApproversForUnitByGroupMembership(PageableData pageableData, String unitUid, String... userGroupUid) Gets list ofSearchPageDataB2BCustomerModelprovided with required pagination parameters withPageableData- Parameters:
pageableData- Pagination informationunitUid- A unique identifier ofB2BUnitModeluserGroupUid- A unique identifier ofB2BUserGroupModel- Returns:
- Collection of paginated
B2BCostCenterModelobjects
-