Class DefaultB2BCommerceUnitService
java.lang.Object
de.hybris.platform.b2b.company.impl.DefaultB2BCommerceUnitService
- All Implemented Interfaces:
B2BCommerceUnitService
Default implementation of
B2BCommerceUnitService-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddisableUnit(String uid) Disable unit based on the given uidvoideditAddressEntry(B2BUnitModel unitModel, AddressModel addressModel) Save updatedAddressModelobject to a unitvoidenableUnit(String uid) Enable unit based on the given uidgetAddressForCode(B2BUnitModel unit, String id) Gets aAddressModelobject for a given unitCollection<? extends B2BUnitModel>Gets all the allowed parent units for a givenB2BUnitModelCollection<? extends B2BUnitModel>Get all the units of a organization for current logged in userCollection<? extends B2BUnitModel>A branch of business units based on the parent unit of the current session user.<T extends B2BCustomerModel>
TCollection<? extends B2BUnitModel>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 togetPagedUsersForUnit(PageableData pageableData, String unit) Gets list ofSearchPageDataB2BCustomerModelfor a given unit for pagination provided with required pagination parameters withPageableData<T extends B2BUnitModel>
TGets a parent unit of the current session user<T extends B2BUnitModel>
TgetParentUnit(B2BUnitModel unit) Gets parent unit based on the given unit<T extends B2BUnitModel>
TGets a Root unit of the organization based on the parent business unit of the session usergetUnitForUid(String unitUid) Gets the unit for uid.voidremoveAddressEntry(String unitUid, String addressId) Removes the address from a given unitvoidsaveAddressEntry(B2BUnitModel unitModel, AddressModel addressModel) Sets a given address for a unitvoidsetB2bCustomerService(B2BCustomerService b2bCustomerService) voidsetB2BGroupCycleValidator(B2BGroupCycleValidator b2bGroupCycleValidator) voidsetB2BUnitService(B2BUnitService<B2BUnitModel, B2BCustomerModel> b2bUnitService) voidsetModelService(ModelService modelService) voidsetPagedB2BCustomerDao(PagedB2BCustomerDao<B2BCustomerModel> pagedB2BCustomerDao) voidsetParentUnit(B2BUnitModel unitModel, B2BUnitModel parentUnit) Assign a parent unit to unitModelvoidsetSearchRestrictionService(SearchRestrictionService searchRestrictionService) voidsetSessionService(SessionService sessionService) voidsetUserService(UserService userService) voidUpdates the branch collection in the session for the current user.
-
Constructor Details
-
DefaultB2BCommerceUnitService
public DefaultB2BCommerceUnitService()
-
-
Method Details
-
getOrganization
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
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
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:
-
getCurrentUser
-
getParentUnit
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
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
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
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()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
-
getUnitForUid
Description copied from interface:B2BCommerceUnitServiceGets the unit for uid.- Specified by:
getUnitForUidin interfaceB2BCommerceUnitService- Parameters:
unitUid- the unit uid- Returns:
- the unit for uid
-
disableUnit
Description copied from interface:B2BCommerceUnitServiceDisable unit based on the given uid- Specified by:
disableUnitin interfaceB2BCommerceUnitService- Parameters:
uid- A unique identifier ofB2BUnitModel
-
enableUnit
Description copied from interface:B2BCommerceUnitServiceEnable unit based on the given uid- Specified by:
enableUnitin interfaceB2BCommerceUnitService- Parameters:
uid- A unique identifier ofB2BUnitModel
-
getPagedUsersForUnit
public SearchPageData<B2BCustomerModel> getPagedUsersForUnit(PageableData pageableData, String unit) 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
-
saveAddressEntry
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
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
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
Description copied from interface:B2BCommerceUnitServiceSave updatedAddressModelobject to a unit- Specified by:
editAddressEntryin interfaceB2BCommerceUnitService- Parameters:
unitModel- A unique identifier ofB2BUnitModeladdressModel-AddressModelobject for given unit
-
getParentUnit
Description copied from interface:B2BCommerceUnitServiceGets parent unit based on the given unit- Specified by:
getParentUnitin interfaceB2BCommerceUnitService- Parameters:
unit- AB2BUnitModelobject- Returns:
- A
B2BUnitModelobject which denotes the parent unit of the given unit
-
getUserService
-
setUserService
-
getB2BUnitService
-
setB2BUnitService
-
getB2BGroupCycleValidator
-
setB2BGroupCycleValidator
-
getSessionService
-
setSessionService
-
getModelService
-
setModelService
-
getSearchRestrictionService
-
setSearchRestrictionService
-
getPagedB2BCustomerDao
-
setPagedB2BCustomerDao
-
getB2bCustomerService
-
setB2bCustomerService
-