T - extension of CompanyModelU - extension of UserModelpublic interface B2BUnitService<T extends CompanyModel,U extends UserModel>
B2BUnitModel.| Modifier and Type | Method and Description |
|---|---|
void |
addMember(T group,
PrincipalModel member)
Adds the member to a group.
|
void |
disableBranch(T unit)
Disable branch.
|
void |
disableUnit(B2BUnitModel unit)
Disables a b2b unit
|
void |
enableBranch(T unit)
Enable branch.
|
void |
enableUnit(B2BUnitModel unit)
Enables a b2b unit
|
EmployeeModel |
findAccountManagerForUnit(T unit)
Deprecated.
Use
getAccountManagerForUnit(CompanyModel) instead |
String |
findApprovalProcessCodeForUnit(T unit)
Deprecated.
Use
getApprovalProcessCodeForUnit(CompanyModel) instead |
T |
findUnitByUid(String uid)
Deprecated.
Use
getUnitForUid(String) instead |
T |
findUnitWithCreditLimit(T unit,
CurrencyModel currency)
Deprecated.
Use
getUnitWithCreditLimit(CompanyModel) instead |
EmployeeModel |
getAccountManagerForUnit(T unit)
Get salesrep from unit, checking parent units up the organization tree up to the root unit if salesrep is not set
in the
unit |
List<String> |
getAllApprovalProcesses()
Deprecated.
Since 6.0. Use
getAllProcessDefinitionsNames() |
List<T> |
getAllParents(T unit)
Get all the parent units in the organization hierarchy all the way up to the root.
|
Set<String> |
getAllProcessDefinitionsNames()
Gets all process definition name registered with the
ProcessDefinitionFactory |
Set<T> |
getAllUnitsOfOrganization(B2BCustomerModel customer)
Retrieves all units of an organization the
customer belongs too. |
Set<T> |
getAllUnitsOfOrganization(T unit)
Deprecated.
Since 6.0. Use
#getBranch(T) instead |
<M extends PrincipalModel> |
getAllUserGroupMembersForType(UserGroupModel userGroup,
Class<M> memberType)
Retrieves all members of a User Group of the specified type
|
String |
getApprovalProcessCodeForUnit(T unit)
Get approval process code from unit, checking parent units up the organization tree up to the root unit if process
is not set in the
unit |
Set<U> |
getB2BCustomers(T unit)
Gets the b2 b customers.
|
Set<T> |
getB2BUnits(T unit)
Gets units that are children of the current unit.
|
Set<T> |
getBranch(T unit)
Gets the branch of a unit.
|
Set<U> |
getCustomers(Set<T> branch)
Gets the employees.
|
T |
getParent(B2BCustomerModel employee)
Gets the parent unit of a user.
|
T |
getParent(T unit)
Gets the parent unit of a unit.
|
T |
getRootUnit(T unit)
Gets the root unit.
|
T |
getUnitForUid(String uid)
Find unit by uid.
|
T |
getUnitWithCreditLimit(T unit)
Get unit with credit limit/credit check group value, checking parent units up the organization tree up to the root
unit if credit limit / credit check group is not set in the
unit |
Collection<B2BCustomerModel> |
getUsersOfUserGroup(B2BUnitModel unit,
String userGroupId,
boolean recursive)
Gets all members from the unit who belong to specified User Group
|
Collection<U> |
getUsersOfUserGroup(T unit,
String userGroupId)
Deprecated.
|
void |
setCurrentUnit(B2BCustomerModel customer,
B2BUnitModel unit)
Assigns a default unit for a customer who may be a member of multiple units.
|
void |
updateBranchInSession(Session session,
UserModel currentUser)
Sets the branch for the current use in the session.
|
void |
updateParentB2BUnit(T parentB2BUnit,
PrincipalModel member)
Set the parent unit of a given principal.
|
@Deprecated Set<T> getAllUnitsOfOrganization(T unit)
#getBranch(T) insteadunit belongs too.unit - A B2BUnitModel within an organizationSet<T> getAllUnitsOfOrganization(B2BCustomerModel customer)
customer belongs too.customer - the session user.<M extends PrincipalModel> Set<M> getAllUserGroupMembersForType(UserGroupModel userGroup, Class<M> memberType)
userGroup - the user groupmemberType - the principle's member typeT getParent(B2BCustomerModel employee)
employee - the employeeT getParent(T unit)
unit - the child unitunit was the root unit.T getRootUnit(T unit)
unit - the unit@Deprecated T findUnitByUid(String uid)
getUnitForUid(String) insteaduid - the uidT getUnitForUid(String uid)
uid - the uidSet<T> getBranch(T unit)
unit - the unitSet<U> getCustomers(Set<T> branch)
branch - the branchvoid disableBranch(T unit)
unit - the unitvoid enableBranch(T unit)
unit - the unitList<T> getAllParents(T unit)
unit - the unitvoid addMember(T group, PrincipalModel member)
group - the groupmember - the memberSet<U> getB2BCustomers(T unit)
unit - the unitSet<T> getB2BUnits(T unit)
unit - the unitvoid updateParentB2BUnit(T parentB2BUnit, PrincipalModel member)
parentB2BUnit - the parent b2 b unitmember - the member@Deprecated Collection<U> getUsersOfUserGroup(T unit, String userGroupId)
getUsersOfUserGroup(de.hybris.platform.b2b.model.B2BUnitModel, String, boolean)unit - the unituserGroupId - the user group idCollection<B2BCustomerModel> getUsersOfUserGroup(B2BUnitModel unit, String userGroupId, boolean recursive)
unit - the unituserGroupId - the user group idrecursive - If true the lookup of users will continue for unit parent until at least one is found.@Deprecated String findApprovalProcessCodeForUnit(T unit)
getApprovalProcessCodeForUnit(CompanyModel) insteadunitunit - String getApprovalProcessCodeForUnit(T unit)
unitunit - @Deprecated List<String> getAllApprovalProcesses()
getAllProcessDefinitionsNames()@Deprecated EmployeeModel findAccountManagerForUnit(T unit)
getAccountManagerForUnit(CompanyModel) insteadunitunit - EmployeeModel getAccountManagerForUnit(T unit)
unitunit - @Deprecated T findUnitWithCreditLimit(T unit, CurrencyModel currency)
getUnitWithCreditLimit(CompanyModel) insteadunitunit - currency - T getUnitWithCreditLimit(T unit)
unitunit - void updateBranchInSession(Session session, UserModel currentUser)
session - currentUser - Set<String> getAllProcessDefinitionsNames()
ProcessDefinitionFactoryvoid disableUnit(B2BUnitModel unit)
unit - the unitvoid enableUnit(B2BUnitModel unit)
unit - the unitvoid setCurrentUnit(B2BCustomerModel customer, B2BUnitModel unit)
customer - The current customerunit - A B2BUnitModel to be assigned as the default for a customerCopyright © 2017 SAP SE. All Rights Reserved.