Class DefaultSourcingFactorService
- java.lang.Object
-
- de.hybris.platform.warehousing.sourcing.factor.impl.DefaultSourcingFactorService
-
- All Implemented Interfaces:
SourcingFactorService
public class DefaultSourcingFactorService extends java.lang.Object implements SourcingFactorService
Default implementation of theSourcingFactorService
-
-
Constructor Summary
Constructors Constructor Description DefaultSourcingFactorService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected SourcingFactorcreateSourcingFactorFromSourcingConfig(SourcingFactorIdentifiersEnum sourcingFactorId, SourcingConfigModel sourcingConfig)Create a single sourcing factor from the SourcingConfig.java.util.Set<SourcingFactor>getAllSourcingFactorsForBaseStore(BaseStoreModel baseStore)Get the list of all the sourcing factors for the givenBaseStoreModel.SourcingFactorgetSourcingFactor(SourcingFactorIdentifiersEnum sourcingFactorId, BaseStoreModel baseStore)Create or retrieve the requested sourcing factor according to the sourcingFactorId and the baseStore given in parameter.protected java.util.Map<SourcingFactorIdentifiersEnum,SourcingFactor>getSourcingFactorsMapForBaseStore(BaseStoreModel baseStore)Creates Map of SourcingFactorIdentifiersEnum and SourcingFactor for the given baseStoreprotected intloadFactorValue(SourcingFactorIdentifiersEnum sourcingFactorId, SourcingConfigModel sourcingConfig)Load the integer value that corresponds to the sourcing factor identifier provided.
-
-
-
Method Detail
-
getSourcingFactor
public SourcingFactor getSourcingFactor(SourcingFactorIdentifiersEnum sourcingFactorId, BaseStoreModel baseStore)
Description copied from interface:SourcingFactorServiceCreate or retrieve the requested sourcing factor according to the sourcingFactorId and the baseStore given in parameter.- Specified by:
getSourcingFactorin interfaceSourcingFactorService- Parameters:
sourcingFactorId- the identifier of the sourcing factorSourcingFactorIdentifiersEnumbaseStore- the baseStore- Returns:
- the
SourcingFactor
-
getAllSourcingFactorsForBaseStore
public java.util.Set<SourcingFactor> getAllSourcingFactorsForBaseStore(BaseStoreModel baseStore)
Description copied from interface:SourcingFactorServiceGet the list of all the sourcing factors for the givenBaseStoreModel.- Specified by:
getAllSourcingFactorsForBaseStorein interfaceSourcingFactorService- Parameters:
baseStore- the baseStore- Returns:
- the list of
SourcingFactor
-
getSourcingFactorsMapForBaseStore
protected java.util.Map<SourcingFactorIdentifiersEnum,SourcingFactor> getSourcingFactorsMapForBaseStore(BaseStoreModel baseStore)
Creates Map of SourcingFactorIdentifiersEnum and SourcingFactor for the given baseStore- Parameters:
baseStore- the baseStore- Returns:
- the map of SourcingFactorIdentifiersEnum and SourcingFactor for the given baseStore; never null
-
createSourcingFactorFromSourcingConfig
protected SourcingFactor createSourcingFactorFromSourcingConfig(SourcingFactorIdentifiersEnum sourcingFactorId, SourcingConfigModel sourcingConfig)
Create a single sourcing factor from the SourcingConfig.- Parameters:
sourcingFactorId- the sourcingFactorIdsourcingConfig- the sourcingConfig for the given baseStore- Returns:
- new sourcing factor; never null
-
loadFactorValue
protected int loadFactorValue(SourcingFactorIdentifiersEnum sourcingFactorId, SourcingConfigModel sourcingConfig)
Load the integer value that corresponds to the sourcing factor identifier provided.- Parameters:
sourcingFactorId- the sourcingFactorIdsourcingConfig- the sourcingConfig for the given baseStore- Returns:
- the integer value or 0 if not found
-
-