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.
Since 4.4. Use
getAccountManagerForUnit(CompanyModel) instead |
java.lang.String |
findApprovalProcessCodeForUnit(T unit)
Deprecated.
Since 4.4. Use
getApprovalProcessCodeForUnit(CompanyModel) instead |
T |
findUnitByUid(java.lang.String uid)
Deprecated.
Since 4.4. Use
getUnitForUid(String) instead |
T |
findUnitWithCreditLimit(T unit,
CurrencyModel currency)
Deprecated.
Since 4.4. 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 |
java.util.List<java.lang.String> |
getAllApprovalProcesses()
Deprecated.
Since 6.0. Use
getAllProcessDefinitionsNames() |
java.util.List<T> |
getAllParents(T unit)
Get all the parent units in the organization hierarchy all the way up to the root.
|
java.util.Set<java.lang.String> |
getAllProcessDefinitionsNames()
Gets all process definition name registered with the
ProcessDefinitionFactory |
java.util.Set<T> |
getAllUnitsOfOrganization(B2BCustomerModel customer)
Retrieves all units of an organization the
customer belongs too. |
java.util.Set<T> |
getAllUnitsOfOrganization(T unit)
Deprecated.
Since 6.0. Use
#getBranch(T) instead |
<M extends PrincipalModel> |
getAllUserGroupMembersForType(UserGroupModel userGroup,
java.lang.Class<M> memberType)
Retrieves all members of a User Group of the specified type
|
java.lang.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 |
java.util.Set<U> |
getB2BCustomers(T unit)
Gets the b2 b customers.
|
java.util.Set<T> |
getB2BUnits(T unit)
Gets units that are children of the current unit.
|
java.util.Set<T> |
getBranch(T unit)
Gets the branch of a unit.
|
java.util.Set<U> |
getCustomers(java.util.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(java.lang.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 |
java.util.Collection<B2BCustomerModel> |
getUsersOfUserGroup(B2BUnitModel unit,
java.lang.String userGroupId,
boolean recursive)
Gets all members from the unit who belong to specified User Group
|
java.util.Collection<U> |
getUsersOfUserGroup(T unit,
java.lang.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 java.util.Set<T> getAllUnitsOfOrganization(T unit)
#getBranch(T) insteadunit belongs too.unit - A B2BUnitModel within an organizationjava.util.Set<T> getAllUnitsOfOrganization(B2BCustomerModel customer)
customer belongs too.customer - the session user.<M extends PrincipalModel> java.util.Set<M> getAllUserGroupMembersForType(UserGroupModel userGroup, java.lang.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(java.lang.String uid)
getUnitForUid(String) insteaduid - the uidT getUnitForUid(java.lang.String uid)
uid - the uidjava.util.Set<T> getBranch(T unit)
unit - the unitjava.util.Set<U> getCustomers(java.util.Set<T> branch)
branch - the branchvoid disableBranch(T unit)
unit - the unitvoid enableBranch(T unit)
unit - the unitjava.util.List<T> getAllParents(T unit)
unit - the unitvoid addMember(T group, PrincipalModel member)
group - the groupmember - the memberjava.util.Set<U> getB2BCustomers(T unit)
unit - the unitjava.util.Set<T> getB2BUnits(T unit)
unit - the unitvoid updateParentB2BUnit(T parentB2BUnit, PrincipalModel member)
parentB2BUnit - the parent b2 b unitmember - the member@Deprecated java.util.Collection<U> getUsersOfUserGroup(T unit, java.lang.String userGroupId)
getUsersOfUserGroup(de.hybris.platform.b2b.model.B2BUnitModel, String, boolean)unit - the unituserGroupId - the user group idjava.util.Collection<B2BCustomerModel> getUsersOfUserGroup(B2BUnitModel unit, java.lang.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 java.lang.String findApprovalProcessCodeForUnit(T unit)
getApprovalProcessCodeForUnit(CompanyModel) insteadunitunit - java.lang.String getApprovalProcessCodeForUnit(T unit)
unitunit - @Deprecated java.util.List<java.lang.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 - java.util.Set<java.lang.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 © 2018 SAP SE. All Rights Reserved.