Class DefaultB2BCommerceUnitService
- java.lang.Object
-
- de.hybris.platform.b2bacceleratorservices.company.impl.DefaultCompanyB2BCommerceService
-
- de.hybris.platform.b2bacceleratorservices.company.impl.DefaultB2BCommerceUnitService
-
- All Implemented Interfaces:
B2BCommerceUnitService,B2BCommerceUnitService,CompanyB2BCommerceService
@Deprecated(since="6.0", forRemoval=true) public class DefaultB2BCommerceUnitService extends DefaultCompanyB2BCommerceService implements B2BCommerceUnitServiceDeprecated, for removal: This API element is subject to removal in a future version.Use Since 6.0.DefaultB2BCommerceUnitServiceinstead.
-
-
Constructor Summary
Constructors Constructor Description DefaultB2BCommerceUnitService()Deprecated, for removal: This API element is subject to removal in a future version.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description B2BCustomerModeladdApproverToUnit(java.lang.String unitId, java.lang.String approverId)Deprecated, for removal: This API element is subject to removal in a future version.Add approver to given unitvoiddisableUnit(java.lang.String uid)Deprecated, for removal: This API element is subject to removal in a future version.Disable unit based on the given uidvoideditAddressEntry(B2BUnitModel unitModel, AddressModel addressModel)Deprecated, for removal: This API element is subject to removal in a future version.Save updatedAddressModelobject to a unitvoidenableUnit(java.lang.String unit)Deprecated, for removal: This API element is subject to removal in a future version.Enable unit based on the given uidSearchPageData<B2BCustomerModel>findPagedApproversForUnitByGroupMembership(PageableData pageableData, java.lang.String unitUid, java.lang.String... usergroupUid)Deprecated, for removal: This API element is subject to removal in a future version.Gets list ofSearchPageDataB2BCustomerModelprovided with required pagination parameters withPageableDataAddressModelgetAddressForCode(B2BUnitModel unit, java.lang.String id)Deprecated, for removal: This API element is subject to removal in a future version.Gets aAddressModelobject for a given unitjava.util.Collection<? extends B2BUnitModel>getAllowedParentUnits(B2BUnitModel unit)Deprecated, for removal: This API element is subject to removal in a future version.Gets all the allowed parent units for a givenB2BUnitModeljava.util.Collection<? extends B2BUnitModel>getAllUnitsOfOrganization()Deprecated, for removal: This API element is subject to removal in a future version.Get all the units of a organization for current logged in userjava.util.Collection<? extends B2BUnitModel>getBranch()Deprecated, for removal: This API element is subject to removal in a future version.A branch of business units based on the parent unit of the current session user.java.util.Collection<? extends B2BUnitModel>getOrganization()Deprecated, for removal: This API element is subject to removal in a future version.A collection of business units based on root unit of an organization to which the parent business unit of the currently logged in customer belongs toSearchPageData<B2BCustomerModel>getPagedUsersForUnit(PageableData pageableData, java.lang.String unit)Deprecated, for removal: This API element is subject to removal in a future version.Gets list ofSearchPageDataB2BCustomerModelfor a given unit for pagination provided with required pagination parameters withPageableData<T extends B2BUnitModel>
TgetParentUnit()Deprecated, for removal: This API element is subject to removal in a future version.Gets a parent unit of the current session user<T extends B2BUnitModel>
TgetRootUnit()Deprecated, for removal: This API element is subject to removal in a future version.Gets a Root unit of the organization based on the parent business unit of the session uservoidremoveAddressEntry(java.lang.String unitUid, java.lang.String addressId)Deprecated, for removal: This API element is subject to removal in a future version.Removes the address from a given unitB2BCustomerModelremoveApproverFromUnit(java.lang.String unitUid, java.lang.String approverUid)Deprecated, for removal: This API element is subject to removal in a future version.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()relationshipvoidsaveAddressEntry(B2BUnitModel unitModel, AddressModel addressModel)Deprecated, for removal: This API element is subject to removal in a future version.Sets a given address for a unitvoidsetParentUnit(B2BUnitModel unitModel, B2BUnitModel parentUnit)Deprecated, for removal: This API element is subject to removal in a future version.Assign a parent unit to unitModelvoidupdateBranchInSession()Deprecated, for removal: This API element is subject to removal in a future version.Updates the branch collection in the session for the current user.-
Methods inherited from class de.hybris.platform.b2bacceleratorservices.company.impl.DefaultCompanyB2BCommerceService
addMemberToUserGroup, getAllCurrencies, getB2BApprovalProcessLookUpStrategy, getB2BApproverService, getB2BBudgetService, getB2BCostCenterService, getB2BCustomerService, getB2BGroupCycleValidator, getB2BPermissionService, getB2BUnitService, getB2BUserGroupForUid, getBusinessProcesses, getBusinessProcessService, getCommerceCommonI18NService, getCommonI18NService, getCurrencyForIsoCode, getCurrentUser, getCustomerForUid, getMembersOfUnitForUserGroup, getModelService, getPagedB2BBudgetDao, getPagedB2BCostCenterDao, getPagedB2BCustomerDao, getPagedB2BPermissionDao, getPagedB2BUserGroupDao, getPagedUsersForUserGroups, getParentUnit, getPermissionForCode, getSearchRestrictionService, getSessionService, getUnitForUid, getUserService, removedMemberFromUserGroup, saveModel, setB2BApprovalProcessLookUpStrategy, setB2BApproverService, setB2BBudgetService, setB2BCostCenterService, setB2BCustomerService, setB2BGroupCycleValidator, setB2BPermissionService, setB2BUnitService, setBusinessProcessService, setCommerceCommonI18NService, setCommonI18NService, setModelService, setPagedB2BBudgetDao, setPagedB2BCostCenterDao, setPagedB2BCustomerDao, setPagedB2BPermissionDao, setPagedB2BUserGroupDao, setSearchRestrictionService, setSessionService, setUserService
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.hybris.platform.b2b.company.B2BCommerceUnitService
getParentUnit, getUnitForUid
-
Methods inherited from interface de.hybris.platform.b2bacceleratorservices.company.B2BCommerceUnitService
getCustomerForUid
-
-
-
-
Method Detail
-
getOrganization
public java.util.Collection<? extends B2BUnitModel> getOrganization()
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:B2BCommerceUnitServiceA collection of business units based on root unit of an organization to which the parent business unit of the currently logged in customer belongs to- Specified by:
getOrganizationin interfaceB2BCommerceUnitService- Returns:
- A collection of units where the root unit is the parent business unit of the currently logged in customer.
-
getBranch
public java.util.Collection<? extends B2BUnitModel> getBranch()
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:B2BCommerceUnitServiceA branch of business units based on the parent unit of the current session user.- Specified by:
getBranchin interfaceB2BCommerceUnitService- Returns:
- A collection of units where the root unit is the parent business unit of the currently logged in customer.
-
getRootUnit
public <T extends B2BUnitModel> T getRootUnit()
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:B2BCommerceUnitServiceGets a Root unit of the organization based on the parent business unit of the session user- Specified by:
getRootUnitin interfaceB2BCommerceUnitService- Returns:
- A root unit of an organization a session customer belongs to
- See Also:
B2BCommerceUnitService.getParentUnit()
-
getParentUnit
public <T extends B2BUnitModel> T getParentUnit()
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:B2BCommerceUnitServiceGets a parent unit of the current session user- Specified by:
getParentUnitin interfaceB2BCommerceUnitService- Returns:
- The business unit assigned to the current session user.
-
getAllUnitsOfOrganization
public java.util.Collection<? extends B2BUnitModel> getAllUnitsOfOrganization()
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:B2BCommerceUnitServiceGet all the units of a organization for current logged in user- Specified by:
getAllUnitsOfOrganizationin interfaceB2BCommerceUnitService- Returns:
- Collection of units for the organization of the current user
-
setParentUnit
public void setParentUnit(B2BUnitModel unitModel, B2BUnitModel parentUnit)
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:B2BCommerceUnitServiceAssign a parent unit to unitModel- Specified by:
setParentUnitin interfaceB2BCommerceUnitService- Parameters:
unitModel- A unit to assign a parent forB2BUnitModelparentUnit- The parent unitB2BUnitModel
-
getAllowedParentUnits
public java.util.Collection<? extends B2BUnitModel> getAllowedParentUnits(B2BUnitModel unit)
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:B2BCommerceUnitServiceGets all the allowed parent units for a givenB2BUnitModel- Specified by:
getAllowedParentUnitsin interfaceB2BCommerceUnitService- Parameters:
unit- A unique identifier for a unit- Returns:
- A collection of
B2BUnitModelfor the given uid
-
updateBranchInSession
public void updateBranchInSession()
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:B2BCommerceUnitServiceUpdates the branch collection in the session for the current user. Should be called after a new unit creation so that its does not get filter out by the unit branch search restriction.- Specified by:
updateBranchInSessionin interfaceB2BCommerceUnitService
-
addApproverToUnit
public B2BCustomerModel addApproverToUnit(java.lang.String unitId, java.lang.String approverId)
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:B2BCommerceUnitServiceAdd approver to given unit- Specified by:
addApproverToUnitin interfaceB2BCommerceUnitService- Parameters:
unitId- A unique identifier forB2BUnitModelapproverId- A unique identifier forB2BCustomerModelwho is a approver- Returns:
- Updated
B2BCustomerModelobject after adding approver to customer.
-
removeApproverFromUnit
public B2BCustomerModel removeApproverFromUnit(java.lang.String unitUid, java.lang.String approverUid)
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:B2BCommerceUnitServiceIf 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- Specified by:
removeApproverFromUnitin interfaceB2BCommerceUnitService- Parameters:
unitUid- A unique identifier ofB2BUnitModelapproverUid- A unique identifier ofB2BCustomerModel- Returns:
- An approver who was removed from a
B2BUnitModel.getApprovers()
-
disableUnit
public void disableUnit(java.lang.String uid)
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:B2BCommerceUnitServiceDisable unit based on the given uid- Specified by:
disableUnitin interfaceB2BCommerceUnitService- Parameters:
uid- A unique identifier ofB2BUnitModel
-
enableUnit
public void enableUnit(java.lang.String unit)
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:B2BCommerceUnitServiceEnable unit based on the given uid- Specified by:
enableUnitin interfaceB2BCommerceUnitService- Parameters:
unit- A unique identifier ofB2BUnitModel
-
getPagedUsersForUnit
public SearchPageData<B2BCustomerModel> getPagedUsersForUnit(PageableData pageableData, java.lang.String unit)
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:B2BCommerceUnitServiceGets list ofSearchPageDataB2BCustomerModelfor a given unit for pagination provided with required pagination parameters withPageableData- Specified by:
getPagedUsersForUnitin interfaceB2BCommerceUnitService- Parameters:
pageableData- Pagination informationunit- A unique identifier ofB2BUnitModel- Returns:
- Collection of paginated
B2BCostCenterModelobjects
-
findPagedApproversForUnitByGroupMembership
public SearchPageData<B2BCustomerModel> findPagedApproversForUnitByGroupMembership(PageableData pageableData, java.lang.String unitUid, java.lang.String... usergroupUid)
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:B2BCommerceUnitServiceGets list ofSearchPageDataB2BCustomerModelprovided with required pagination parameters withPageableData- Specified by:
findPagedApproversForUnitByGroupMembershipin interfaceB2BCommerceUnitService- Parameters:
pageableData- Pagination informationunitUid- A unique identifier ofB2BUnitModelusergroupUid- A unique identifier ofB2BUserGroupModel- Returns:
- Collection of paginated
B2BCostCenterModelobjects
-
saveAddressEntry
public void saveAddressEntry(B2BUnitModel unitModel, AddressModel addressModel)
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:B2BCommerceUnitServiceSets a given address for a unit- Specified by:
saveAddressEntryin interfaceB2BCommerceUnitService- Parameters:
unitModel- A unique identifier ofB2BUnitModeladdressModel-AddressModelobject which is getting added to unit
-
removeAddressEntry
public void removeAddressEntry(java.lang.String unitUid, java.lang.String addressId)Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:B2BCommerceUnitServiceRemoves the address from a given unit- Specified by:
removeAddressEntryin interfaceB2BCommerceUnitService- Parameters:
unitUid- A unique identifier ofB2BUnitModeladdressId- A unique identifier ofAddressModel
-
getAddressForCode
public AddressModel getAddressForCode(B2BUnitModel unit, java.lang.String id)
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:B2BCommerceUnitServiceGets aAddressModelobject for a given unit- Specified by:
getAddressForCodein interfaceB2BCommerceUnitService- Parameters:
unit- A unique identifier ofB2BUnitModelid- A unique identifier ofAddressModel- Returns:
AddressModelobject
-
editAddressEntry
public void editAddressEntry(B2BUnitModel unitModel, AddressModel addressModel)
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:B2BCommerceUnitServiceSave updatedAddressModelobject to a unit- Specified by:
editAddressEntryin interfaceB2BCommerceUnitService- Parameters:
unitModel- A unique identifier ofB2BUnitModeladdressModel-AddressModelobject for given unit
-
-