public class DefaultB2BUnitService extends java.lang.Object implements B2BUnitService<B2BUnitModel,B2BCustomerModel>
B2BUnitService| Constructor and Description |
|---|
DefaultB2BUnitService() |
| Modifier and Type | Method and Description |
|---|---|
void |
addMember(B2BUnitModel group,
PrincipalModel member)
Adds the member to a group.
|
void |
disableBranch(B2BUnitModel unit)
Disable branch.
|
void |
disableUnit(B2BUnitModel unit)
Disables a b2b unit
|
void |
enableBranch(B2BUnitModel unit)
Enable branch.
|
void |
enableUnit(B2BUnitModel unit)
Enables a b2b unit
|
EmployeeModel |
findAccountManagerForUnit(B2BUnitModel unit)
Deprecated.
Since 4.4. Use
getAccountManagerForUnit(B2BUnitModel) instead |
java.lang.String |
findApprovalProcessCodeForUnit(B2BUnitModel unit)
Deprecated.
Since 4.4. Use
getApprovalProcessCodeForUnit(B2BUnitModel) instead |
B2BUnitModel |
findUnitByUid(java.lang.String uid)
Deprecated.
Since 4.4. Use
getUnitForUid(String) instead |
B2BUnitModel |
findUnitWithCreditLimit(B2BUnitModel unit,
CurrencyModel currency)
Deprecated.
Since 4.4. Use
getUnitWithCreditLimit(B2BUnitModel) instead |
EmployeeModel |
getAccountManagerForUnit(B2BUnitModel 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 |
protected B2BCreditLimitModel |
getActiveCreditLimit(B2BUnitModel unit) |
java.util.List<java.lang.String> |
getAllApprovalProcesses()
Deprecated.
Since 6.0. Use
getAllProcessDefinitionsNames() |
java.util.List<B2BUnitModel> |
getAllParents(B2BUnitModel 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<B2BUnitModel> |
getAllUnitsOfOrganization(B2BCustomerModel employee)
Retrieves all units of an organization the
customer belongs too. |
java.util.Set<B2BUnitModel> |
getAllUnitsOfOrganization(B2BUnitModel unit)
Deprecated.
Since 6.0. Use
getBranch(B2BUnitModel) 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(B2BUnitModel 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<B2BCustomerModel> |
getB2BCustomers(B2BUnitModel unit)
Gets the b2 b customers.
|
protected B2BUnitDao |
getB2bUnitDao() |
java.util.Set<B2BUnitModel> |
getB2BUnits(B2BUnitModel unit)
Gets units that are children of the current unit.
|
java.util.Set<B2BUnitModel> |
getBranch(B2BUnitModel unit)
Gets the branch of a unit.
|
protected void |
getBranch(B2BUnitModel parent,
java.util.Set<B2BUnitModel> organizationSet) |
protected ConfigurationService |
getConfigurationService() |
java.util.Set<B2BCustomerModel> |
getCustomers(java.util.Set<B2BUnitModel> branch)
Gets the employees.
|
protected ModelService |
getModelService() |
B2BUnitModel |
getParent(B2BCustomerModel employee)
Gets the parent unit of a user.
|
B2BUnitModel |
getParent(B2BUnitModel unit)
Gets the parent unit of a unit.
|
protected PrincipalGroupMembersDao |
getPrincipalGroupMembersDao() |
protected ProcessDefinitionFactory |
getProcessDefinitionFactory() |
B2BUnitModel |
getRootUnit(B2BUnitModel unit)
Gets the root unit.
|
protected SearchRestrictionService |
getSearchRestrictionService() |
protected SessionService |
getSessionService() |
protected TypeService |
getTypeService() |
B2BUnitModel |
getUnitForUid(java.lang.String uid)
Find unit by uid.
|
B2BUnitModel |
getUnitWithCreditLimit(B2BUnitModel 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 |
protected UserService |
getUserService() |
java.util.Collection<B2BCustomerModel> |
getUsersOfUserGroup(B2BUnitModel unit,
java.lang.String userGroupId)
Deprecated.
|
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
|
protected EnumerationValueModel |
lookupPriceGroupFromClosestParent(B2BUnitModel unitOfCustomer) |
void |
setB2bUnitDao(B2BUnitDao b2bUnitDao) |
void |
setConfigurationService(ConfigurationService configurationService) |
void |
setCurrentUnit(B2BCustomerModel customer,
B2BUnitModel unit)
Assigns a default unit for a customer who may be a member of multiple units.
|
void |
setModelService(ModelService modelService) |
void |
setPrincipalGroupMembersDao(PrincipalGroupMembersDao principalGroupMembersDao) |
void |
setProcessDefinitionFactory(ProcessDefinitionFactory processDefinitionFactory) |
void |
setSearchRestrictionService(SearchRestrictionService searchRestrictionService) |
void |
setSessionService(SessionService sessionService) |
void |
setTypeService(TypeService typeService) |
void |
setUserService(UserService userService) |
protected void |
toggleBranch(B2BUnitModel unit,
java.lang.Boolean enable)
Enables or disables a branch and it sibling types
B2BCostCenterModel B2BBudgetModel and
B2BCustomerModel assigned to all units in the branch. |
protected void |
toggleUnit(B2BUnitModel b2bUnitModel,
java.lang.Boolean enable) |
void |
updateBranchInSession(Session session,
UserModel currentUser)
Sets the branch for the current use in the session.
|
void |
updateParentB2BUnit(B2BUnitModel parentB2BUnit,
PrincipalModel member)
Set the parent unit of a given principal.
|
@Deprecated public java.util.Set<B2BUnitModel> getAllUnitsOfOrganization(B2BUnitModel unit)
getBranch(B2BUnitModel) insteadB2BUnitServiceunit belongs too.getAllUnitsOfOrganization in interface B2BUnitService<B2BUnitModel,B2BCustomerModel>unit - A B2BUnitModel within an organizationpublic java.util.Set<B2BUnitModel> getBranch(B2BUnitModel unit)
B2BUnitServicegetBranch in interface B2BUnitService<B2BUnitModel,B2BCustomerModel>unit - the unitpublic void disableBranch(B2BUnitModel unit)
B2BUnitServicedisableBranch in interface B2BUnitService<B2BUnitModel,B2BCustomerModel>unit - the unitpublic void enableBranch(B2BUnitModel unit)
B2BUnitServiceenableBranch in interface B2BUnitService<B2BUnitModel,B2BCustomerModel>unit - the unitpublic void disableUnit(B2BUnitModel unit)
B2BUnitServicedisableUnit in interface B2BUnitService<B2BUnitModel,B2BCustomerModel>unit - the unitpublic void enableUnit(B2BUnitModel unit)
B2BUnitServiceenableUnit in interface B2BUnitService<B2BUnitModel,B2BCustomerModel>unit - the unitpublic void setCurrentUnit(B2BCustomerModel customer, B2BUnitModel unit)
B2BUnitServicesetCurrentUnit in interface B2BUnitService<B2BUnitModel,B2BCustomerModel>customer - The current customerunit - A B2BUnitModel to be assigned as the default for a customerprotected void toggleBranch(B2BUnitModel unit, java.lang.Boolean enable)
B2BCostCenterModel B2BBudgetModel and
B2BCustomerModel assigned to all units in the branch.unit - A unit to look up a branch for via getBranch(de.hybris.platform.b2b.model.B2BUnitModel)enable - If Boolean.TRUE all units in the branch will be activated by setting active attribute to true.
If false the reverse will happen.protected void toggleUnit(B2BUnitModel b2bUnitModel, java.lang.Boolean enable)
public java.util.Set<B2BUnitModel> getB2BUnits(B2BUnitModel unit)
B2BUnitServicegetB2BUnits in interface B2BUnitService<B2BUnitModel,B2BCustomerModel>unit - the unitpublic java.util.Set<B2BCustomerModel> getB2BCustomers(B2BUnitModel unit)
B2BUnitServicegetB2BCustomers in interface B2BUnitService<B2BUnitModel,B2BCustomerModel>unit - the unitprotected void getBranch(B2BUnitModel parent, java.util.Set<B2BUnitModel> organizationSet)
public java.util.Set<B2BUnitModel> getAllUnitsOfOrganization(B2BCustomerModel employee)
B2BUnitServicecustomer belongs too.getAllUnitsOfOrganization in interface B2BUnitService<B2BUnitModel,B2BCustomerModel>employee - the session user.public B2BUnitModel getParent(B2BCustomerModel employee)
B2BUnitServicegetParent in interface B2BUnitService<B2BUnitModel,B2BCustomerModel>employee - the employeepublic B2BUnitModel getParent(B2BUnitModel unit)
B2BUnitServicegetParent in interface B2BUnitService<B2BUnitModel,B2BCustomerModel>unit - the child unitunit was the root unit.public B2BUnitModel getRootUnit(B2BUnitModel unit)
B2BUnitServicegetRootUnit in interface B2BUnitService<B2BUnitModel,B2BCustomerModel>unit - the unitpublic java.util.List<B2BUnitModel> getAllParents(B2BUnitModel unit)
B2BUnitServicegetAllParents in interface B2BUnitService<B2BUnitModel,B2BCustomerModel>unit - the unit@Deprecated public B2BUnitModel findUnitByUid(java.lang.String uid)
getUnitForUid(String) insteadB2BUnitServicefindUnitByUid in interface B2BUnitService<B2BUnitModel,B2BCustomerModel>uid - the uidpublic B2BUnitModel getUnitForUid(java.lang.String uid)
B2BUnitServicegetUnitForUid in interface B2BUnitService<B2BUnitModel,B2BCustomerModel>uid - the uidpublic java.util.Set<B2BCustomerModel> getCustomers(java.util.Set<B2BUnitModel> branch)
B2BUnitServicegetCustomers in interface B2BUnitService<B2BUnitModel,B2BCustomerModel>branch - the branchpublic <M extends PrincipalModel> java.util.Set<M> getAllUserGroupMembersForType(UserGroupModel userGroup, java.lang.Class<M> memberType)
B2BUnitServicegetAllUserGroupMembersForType in interface B2BUnitService<B2BUnitModel,B2BCustomerModel>userGroup - the user groupmemberType - the principle's member typepublic void addMember(B2BUnitModel group, PrincipalModel member)
B2BUnitServiceaddMember in interface B2BUnitService<B2BUnitModel,B2BCustomerModel>group - the groupmember - the memberpublic void updateParentB2BUnit(B2BUnitModel parentB2BUnit, PrincipalModel member)
B2BUnitServiceupdateParentB2BUnit in interface B2BUnitService<B2BUnitModel,B2BCustomerModel>parentB2BUnit - the parent b2 b unitmember - the member@Deprecated public java.util.Collection<B2BCustomerModel> getUsersOfUserGroup(B2BUnitModel unit, java.lang.String userGroupId)
getUsersOfUserGroup(de.hybris.platform.b2b.model.B2BUnitModel, String, boolean)B2BUnitServicegetUsersOfUserGroup in interface B2BUnitService<B2BUnitModel,B2BCustomerModel>unit - the unituserGroupId - the user group idpublic java.util.Collection<B2BCustomerModel> getUsersOfUserGroup(B2BUnitModel unit, java.lang.String userGroupId, boolean recursive)
B2BUnitServicegetUsersOfUserGroup in interface B2BUnitService<B2BUnitModel,B2BCustomerModel>unit - the unituserGroupId - the user group idrecursive - If true the lookup of users will continue for unit parent until at least one is found.public void updateBranchInSession(Session session, UserModel currentUser)
B2BUnitServiceupdateBranchInSession in interface B2BUnitService<B2BUnitModel,B2BCustomerModel>@Deprecated public java.lang.String findApprovalProcessCodeForUnit(B2BUnitModel unit)
getApprovalProcessCodeForUnit(B2BUnitModel) insteadB2BUnitServiceunitfindApprovalProcessCodeForUnit in interface B2BUnitService<B2BUnitModel,B2BCustomerModel>public java.lang.String getApprovalProcessCodeForUnit(B2BUnitModel unit)
B2BUnitServiceunitgetApprovalProcessCodeForUnit in interface B2BUnitService<B2BUnitModel,B2BCustomerModel>public void setUserService(UserService userService)
@Deprecated public java.util.List<java.lang.String> getAllApprovalProcesses()
getAllProcessDefinitionsNames()B2BUnitServicegetAllApprovalProcesses in interface B2BUnitService<B2BUnitModel,B2BCustomerModel>public java.util.Set<java.lang.String> getAllProcessDefinitionsNames()
B2BUnitServiceProcessDefinitionFactorygetAllProcessDefinitionsNames in interface B2BUnitService<B2BUnitModel,B2BCustomerModel>@Deprecated public EmployeeModel findAccountManagerForUnit(B2BUnitModel unit)
getAccountManagerForUnit(B2BUnitModel) insteadB2BUnitServiceunitfindAccountManagerForUnit in interface B2BUnitService<B2BUnitModel,B2BCustomerModel>public EmployeeModel getAccountManagerForUnit(B2BUnitModel unit)
B2BUnitServiceunitgetAccountManagerForUnit in interface B2BUnitService<B2BUnitModel,B2BCustomerModel>@Deprecated public B2BUnitModel findUnitWithCreditLimit(B2BUnitModel unit, CurrencyModel currency)
getUnitWithCreditLimit(B2BUnitModel) insteadB2BUnitServiceunitfindUnitWithCreditLimit in interface B2BUnitService<B2BUnitModel,B2BCustomerModel>public B2BUnitModel getUnitWithCreditLimit(B2BUnitModel unit)
B2BUnitServiceunitgetUnitWithCreditLimit in interface B2BUnitService<B2BUnitModel,B2BCustomerModel>protected B2BCreditLimitModel getActiveCreditLimit(B2BUnitModel unit)
protected ConfigurationService getConfigurationService()
protected SearchRestrictionService getSearchRestrictionService()
protected EnumerationValueModel lookupPriceGroupFromClosestParent(B2BUnitModel unitOfCustomer)
public void setConfigurationService(ConfigurationService configurationService)
public void setSearchRestrictionService(SearchRestrictionService searchRestrictionService)
public void setB2bUnitDao(B2BUnitDao b2bUnitDao)
protected ModelService getModelService()
public void setModelService(ModelService modelService)
protected SessionService getSessionService()
public void setSessionService(SessionService sessionService)
protected UserService getUserService()
protected ProcessDefinitionFactory getProcessDefinitionFactory()
public void setProcessDefinitionFactory(ProcessDefinitionFactory processDefinitionFactory)
protected PrincipalGroupMembersDao getPrincipalGroupMembersDao()
public void setPrincipalGroupMembersDao(PrincipalGroupMembersDao principalGroupMembersDao)
protected B2BUnitDao getB2bUnitDao()
public void setTypeService(TypeService typeService)
protected TypeService getTypeService()
Copyright © 2018 SAP SE. All Rights Reserved.