Class DefaultB2BUnitFacade
java.lang.Object
de.hybris.platform.b2bcommercefacades.company.impl.DefaultB2BUnitFacade
- All Implemented Interfaces:
B2BUnitFacade
- Direct Known Subclasses:
DefaultChineseB2BUnitFacade
Default implementation of
B2BUnitFacade-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAddressToUnit(AddressData newAddress, String unitUid) Associates an address to a business unitvoiddisableUnit(String unitUid) Disables a unit based on a uid of aB2BUnitModelprotected booleandoesUnitExist(String unitUid) voideditAddressOfUnit(AddressData newAddress, String unitUid) Edit address of a unitvoidenableUnit(String unitUid) Enable a Business Unit that is not activeprotected Converter<AddressData,AddressModel> Get All units of organization which are enabled.A list of parent units for which the unit with uid can be assigned as a siblingprotected B2BCommerceUnitServiceprotected Converter<B2BUnitModel,B2BUnitData> protected Converter<B2BUnitData,B2BUnitModel> protected B2BUnitService<B2BUnitModel,UserModel> protected Converter<B2BCustomerModel,CustomerData> Gets a list ofB2BUnitNodeDatarepresenting each unit in the branch based on the session customerprotected ConfigurationServiceprotected ModelServiceprotected OrgUnitHierarchyServicegetPagedAdministratorsForUnit(PageableData pageableData, String unitUid) Get a list of administrators associated with a give unit.getPagedCustomersForUnit(PageableData pageableData, String unitUid) Get a list of customers associated with a give unit.getPagedManagersForUnit(PageableData pageableData, String unitUid) Get a list of managers associated with a give unit.getPagedUserDataForUnit(PageableData pageableData, String unit) Get a list of customers directly associated to the unit plus all the customers who are members of given list of usergroups with the visible branch for the current session user.protected SearchPageData<CustomerData>getPagedUsersForUnit(PageableData pageableData, String unitUid, Collection<?> unitCollection) Gets the business unit assigned to the current session user with all the children retrieved viaB2BUnitData.getChildren().Gets a business unit as a B2BUnitNodeData assigned to the current session user with all the children retrieved viaB2BUnitNodeData.getChildren()which only has enough data to construct a tree view.protected SessionServicegetUnitForUid(String uid) Gets aB2BUnitDatagiven its uid.protected Converter<B2BUnitModel,B2BUnitNodeData> protected UserServiceprotected B2BUnitDatagetValidUnitForUid(String uid) voidremoveAddressFromUnit(String unitUid, String addressId) Remove an address from a unitvoidsetAddressReverseConverter(Converter<AddressData, AddressModel> addressReverseConverter) voidsetB2BCommerceUnitService(B2BCommerceUnitService b2bCommerceUnitService) voidsetB2BUnitConverter(Converter<B2BUnitModel, B2BUnitData> b2bUnitConverter) voidsetB2BUnitReverseConverter(Converter<B2BUnitData, B2BUnitModel> b2BUnitReverseConverter) voidsetB2BUnitService(B2BUnitService<B2BUnitModel, UserModel> b2bUnitService) voidsetB2BUserConverter(Converter<B2BCustomerModel, CustomerData> b2bUserConverter) voidsetConfigurationService(ConfigurationService configurationService) voidsetModelService(ModelService modelService) voidsetOrgUnitHierarchyService(OrgUnitHierarchyService orgUnitHierarchyService) voidsetSessionService(SessionService sessionService) voidsetUnitTreeConverter(Converter<B2BUnitModel, B2BUnitNodeData> unitTreeConverter) voidsetUserService(UserService userService) voidupdateOrCreateBusinessUnit(String originalUid, B2BUnitData unit) UpdatesB2BUnitModelbased on unit data if param originalUid is null the new unit is created
-
Constructor Details
-
DefaultB2BUnitFacade
public DefaultB2BUnitFacade()
-
-
Method Details
-
getPagedCustomersForUnit
public SearchPageData<CustomerData> getPagedCustomersForUnit(PageableData pageableData, String unitUid) Description copied from interface:B2BUnitFacadeGet a list of customers associated with a give unit.- Specified by:
getPagedCustomersForUnitin interfaceB2BUnitFacadeunitUid- A uid of aB2BUnitModel- Returns:
- A paginated list of customers.
-
getPagedAdministratorsForUnit
public SearchPageData<CustomerData> getPagedAdministratorsForUnit(PageableData pageableData, String unitUid) Description copied from interface:B2BUnitFacadeGet a list of administrators associated with a give unit.- Specified by:
getPagedAdministratorsForUnitin interfaceB2BUnitFacadeunitUid- A uid of aB2BUnitModel- Returns:
- A paginated list of customers.
-
getPagedManagersForUnit
public SearchPageData<CustomerData> getPagedManagersForUnit(PageableData pageableData, String unitUid) Description copied from interface:B2BUnitFacadeGet a list of managers associated with a give unit.- Specified by:
getPagedManagersForUnitin interfaceB2BUnitFacadeunitUid- A uid of aB2BUnitModel- Returns:
- A paginated list of customers.
-
getPagedUsersForUnit
protected SearchPageData<CustomerData> getPagedUsersForUnit(PageableData pageableData, String unitUid, Collection<?> unitCollection) -
disableUnit
Description copied from interface:B2BUnitFacadeDisables a unit based on a uid of aB2BUnitModel- Specified by:
disableUnitin interfaceB2BUnitFacade
-
enableUnit
Description copied from interface:B2BUnitFacadeEnable a Business Unit that is not active- Specified by:
enableUnitin interfaceB2BUnitFacade- Parameters:
unitUid- A unitUid uid
-
getParentUnit
Description copied from interface:B2BUnitFacadeGets the business unit assigned to the current session user with all the children retrieved viaB2BUnitData.getChildren().- Specified by:
getParentUnitin interfaceB2BUnitFacade- Returns:
- the business unit assigned to the session customer
-
getParentUnitNode
Description copied from interface:B2BUnitFacadeGets a business unit as a B2BUnitNodeData assigned to the current session user with all the children retrieved viaB2BUnitNodeData.getChildren()which only has enough data to construct a tree view.- Specified by:
getParentUnitNodein interfaceB2BUnitFacade- Returns:
- A business unit assigned to the session customer
-
getAllowedParentUnits
Description copied from interface:B2BUnitFacadeA list of parent units for which the unit with uid can be assigned as a sibling- Specified by:
getAllowedParentUnitsin interfaceB2BUnitFacade- Parameters:
uid- An id of aB2BUnitModel- Returns:
- A list of parent units that a given unit can be a child of
-
getAllActiveUnitsOfOrganization
Description copied from interface:B2BUnitFacadeGet All units of organization which are enabled.- Specified by:
getAllActiveUnitsOfOrganizationin interfaceB2BUnitFacade- Returns:
- A collection of B2BUnit uids.
-
getPagedUserDataForUnit
Description copied from interface:B2BUnitFacadeGet a list of customers directly associated to the unit plus all the customers who are members of given list of usergroups with the visible branch for the current session user. A list ofPrincipalModel.getUid()- Specified by:
getPagedUserDataForUnitin interfaceB2BUnitFacade- Parameters:
pageableData- Pagination dataunit- A unit UID- Returns:
- A paginated list of
CustomerData
-
addAddressToUnit
Description copied from interface:B2BUnitFacadeAssociates an address to a business unit- Specified by:
addAddressToUnitin interfaceB2BUnitFacade- Parameters:
newAddress- Address data objectunitUid- A unit uid
-
removeAddressFromUnit
Description copied from interface:B2BUnitFacadeRemove an address from a unit- Specified by:
removeAddressFromUnitin interfaceB2BUnitFacade
-
editAddressOfUnit
Description copied from interface:B2BUnitFacadeEdit address of a unit- Specified by:
editAddressOfUnitin interfaceB2BUnitFacade- Parameters:
newAddress- Address dataunitUid- A unit UID
-
updateOrCreateBusinessUnit
Description copied from interface:B2BUnitFacadeUpdatesB2BUnitModelbased on unit data if param originalUid is null the new unit is created- Specified by:
updateOrCreateBusinessUnitin interfaceB2BUnitFacade- Parameters:
originalUid- the uid ofB2BUnitModelto update.unit- A unit data object
-
getBranchNodes
Description copied from interface:B2BUnitFacadeGets a list ofB2BUnitNodeDatarepresenting each unit in the branch based on the session customer- Specified by:
getBranchNodesin interfaceB2BUnitFacade- Returns:
- A list of units in the branch.
-
getUnitForUid
Description copied from interface:B2BUnitFacadeGets aB2BUnitDatagiven its uid.- Specified by:
getUnitForUidin interfaceB2BUnitFacade- Returns:
- The unit.
-
getValidUnitForUid
-
doesUnitExist
-
getModelService
-
setModelService
-
getSessionService
-
setSessionService
-
getUserService
-
setUserService
-
getB2BUnitService
-
setB2BUnitService
-
getB2BCommerceUnitService
-
setB2BCommerceUnitService
-
getB2BUnitConverter
-
setB2BUnitConverter
-
getUnitTreeConverter
-
setUnitTreeConverter
-
getB2BUserConverter
-
setB2BUserConverter
-
getAddressReverseConverter
-
setAddressReverseConverter
-
getB2BUnitReverseConverter
-
setB2BUnitReverseConverter
-
getOrgUnitHierarchyService
-
setOrgUnitHierarchyService
-
getConfigurationService
-
setConfigurationService
-