Class CPSDomainOnDemandStrategyImpl
java.lang.Object
de.hybris.platform.sap.productconfig.runtime.cps.impl.CPSDomainOnDemandStrategyImpl
- All Implemented Interfaces:
CPSDomainOnDemandStrategy
Communication to cloud engine
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondetermineFirstGroup(de.hybris.platform.sap.productconfig.runtime.interf.model.ConfigModel configModel) Determines the first group of a configuration modelprotected voidenrichModelWithGroup(de.hybris.platform.sap.productconfig.runtime.interf.model.ConfigModel configModel, String currentGroup) voidenrichModelWithGroupForInstance(de.hybris.platform.sap.productconfig.runtime.interf.model.ConfigModel configModel, String instanceId, List<String> groupNames) Enriches the configuration model with data for an instance and a list of groups that belong to this instanceprotected org.apache.commons.lang3.tuple.Pair<de.hybris.platform.sap.productconfig.runtime.interf.model.CsticGroupModel,de.hybris.platform.sap.productconfig.runtime.interf.model.InstanceModel> findFirstGroupWithVisibleCstic(de.hybris.platform.sap.productconfig.runtime.interf.model.InstanceModel instance) protected Optional<de.hybris.platform.sap.productconfig.runtime.interf.model.CsticGroupModel>findGroup(de.hybris.platform.sap.productconfig.runtime.interf.model.InstanceModel instance, String instId, String groupName) protected Optional<de.hybris.platform.sap.productconfig.runtime.interf.model.InstanceModel>findInstance(de.hybris.platform.sap.productconfig.runtime.interf.model.InstanceModel instance, String instId) protected CharonFacadeprotected CPSConflictGroupHandlerprotected de.hybris.platform.sap.productconfig.runtime.interf.ContextualConverter<CPSItem,de.hybris.platform.sap.productconfig.runtime.interf.model.InstanceModel, MasterDataContext> protected de.hybris.platform.sap.productconfig.runtime.interf.services.UniqueKeyGeneratorprotected ConfigurationMasterDataServiceprotected booleanhasGroupVisibleCstic(de.hybris.platform.sap.productconfig.runtime.interf.model.InstanceModel instance, de.hybris.platform.sap.productconfig.runtime.interf.model.CsticGroupModel group) protected voidmergeDetailsForCstics(de.hybris.platform.sap.productconfig.runtime.interf.model.ConfigModel configModel, de.hybris.platform.sap.productconfig.runtime.interf.model.InstanceModel enrichedInstance, String instId, List<String> csticNames) protected voidmergeDomainValues(de.hybris.platform.sap.productconfig.runtime.interf.model.InstanceModel instanceModel, de.hybris.platform.sap.productconfig.runtime.interf.model.CsticModel cstic) protected voidmergeDomainValues(List<String> csticNames, de.hybris.platform.sap.productconfig.runtime.interf.model.InstanceModel instanceModel, de.hybris.platform.sap.productconfig.runtime.interf.model.InstanceModel instanceModelEnriched) protected voidmergeGroupDetails(de.hybris.platform.sap.productconfig.runtime.interf.model.ConfigModel configModel, de.hybris.platform.sap.productconfig.runtime.interf.model.InstanceModel enrichedInstance, String instId, String groupName) protected voidmergeGroupDetails(de.hybris.platform.sap.productconfig.runtime.interf.model.ConfigModel configModel, de.hybris.platform.sap.productconfig.runtime.interf.model.InstanceModel enrichedInstance, String instId, List<String> groupNames) voidprocessRequiredGroups(de.hybris.platform.sap.productconfig.runtime.interf.model.ConfigModel configModel, String currentGroup) Completes a configuration model with regards to domains that still need to be read.voidsetCharonFacade(CharonFacade charonFacade) voidsetConflictGroupHandler(CPSConflictGroupHandler conflictGroupHandler) voidsetItemModelConverter(de.hybris.platform.sap.productconfig.runtime.interf.ContextualConverter<CPSItem, de.hybris.platform.sap.productconfig.runtime.interf.model.InstanceModel, MasterDataContext> instanceModelConverter) voidsetKeyGenerator(de.hybris.platform.sap.productconfig.runtime.interf.services.UniqueKeyGenerator keyGenerator) voidsetMasterDataService(ConfigurationMasterDataService masterDataService)
-
Constructor Details
-
CPSDomainOnDemandStrategyImpl
public CPSDomainOnDemandStrategyImpl()
-
-
Method Details
-
setKeyGenerator
public void setKeyGenerator(de.hybris.platform.sap.productconfig.runtime.interf.services.UniqueKeyGenerator keyGenerator) -
getKeyGenerator
protected de.hybris.platform.sap.productconfig.runtime.interf.services.UniqueKeyGenerator getKeyGenerator() -
setConflictGroupHandler
-
getConflictGroupHandler
-
setMasterDataService
-
getMasterDataService
-
setCharonFacade
-
getCharonFacade
-
setItemModelConverter
public void setItemModelConverter(de.hybris.platform.sap.productconfig.runtime.interf.ContextualConverter<CPSItem, de.hybris.platform.sap.productconfig.runtime.interf.model.InstanceModel, MasterDataContext> instanceModelConverter) -
getItemModelConverter
protected de.hybris.platform.sap.productconfig.runtime.interf.ContextualConverter<CPSItem,de.hybris.platform.sap.productconfig.runtime.interf.model.InstanceModel, getItemModelConverter()MasterDataContext> -
processRequiredGroups
public void processRequiredGroups(de.hybris.platform.sap.productconfig.runtime.interf.model.ConfigModel configModel, String currentGroup) throws de.hybris.platform.sap.productconfig.runtime.interf.ConfigurationEngineException Description copied from interface:CPSDomainOnDemandStrategyCompletes a configuration model with regards to domains that still need to be read. The groups for which domain values are requested contain the current group + groups that participate in conflicts- Specified by:
processRequiredGroupsin interfaceCPSDomainOnDemandStrategy- Parameters:
configModel- ModelcurrentGroup- The group that should be interactively processed, and for which we need to request the domain values- Throws:
de.hybris.platform.sap.productconfig.runtime.interf.ConfigurationEngineException- Something went wrong with the charon call
-
determineFirstGroup
public String determineFirstGroup(de.hybris.platform.sap.productconfig.runtime.interf.model.ConfigModel configModel) Description copied from interface:CPSDomainOnDemandStrategyDetermines the first group of a configuration model- Specified by:
determineFirstGroupin interfaceCPSDomainOnDemandStrategy- Parameters:
configModel- Model- Returns:
- ID of first group
-
enrichModelWithGroupForInstance
public void enrichModelWithGroupForInstance(de.hybris.platform.sap.productconfig.runtime.interf.model.ConfigModel configModel, String instanceId, List<String> groupNames) throws de.hybris.platform.sap.productconfig.runtime.interf.ConfigurationEngineException Description copied from interface:CPSDomainOnDemandStrategyEnriches the configuration model with data for an instance and a list of groups that belong to this instance- Specified by:
enrichModelWithGroupForInstancein interfaceCPSDomainOnDemandStrategy- Parameters:
configModel- Configuration modelinstanceId- Instance IDgroupNames- List of UI groups- Throws:
de.hybris.platform.sap.productconfig.runtime.interf.ConfigurationEngineException- Something went wrong with the charon call
-
enrichModelWithGroup
protected void enrichModelWithGroup(de.hybris.platform.sap.productconfig.runtime.interf.model.ConfigModel configModel, String currentGroup) throws de.hybris.platform.sap.productconfig.runtime.interf.ConfigurationEngineException - Throws:
de.hybris.platform.sap.productconfig.runtime.interf.ConfigurationEngineException
-
findFirstGroupWithVisibleCstic
protected org.apache.commons.lang3.tuple.Pair<de.hybris.platform.sap.productconfig.runtime.interf.model.CsticGroupModel,de.hybris.platform.sap.productconfig.runtime.interf.model.InstanceModel> findFirstGroupWithVisibleCstic(de.hybris.platform.sap.productconfig.runtime.interf.model.InstanceModel instance) -
hasGroupVisibleCstic
protected boolean hasGroupVisibleCstic(de.hybris.platform.sap.productconfig.runtime.interf.model.InstanceModel instance, de.hybris.platform.sap.productconfig.runtime.interf.model.CsticGroupModel group) -
mergeGroupDetails
-
mergeGroupDetails
-
mergeDetailsForCstics
-
mergeDomainValues
-
mergeDomainValues
protected void mergeDomainValues(de.hybris.platform.sap.productconfig.runtime.interf.model.InstanceModel instanceModel, de.hybris.platform.sap.productconfig.runtime.interf.model.CsticModel cstic) -
findInstance
-
findGroup
-