Class DefaultSourcingFactorService
java.lang.Object
de.hybris.platform.warehousing.sourcing.factor.impl.DefaultSourcingFactorService
- All Implemented Interfaces:
SourcingFactorService
Default implementation of the
SourcingFactorService-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected SourcingFactorcreateSourcingFactorFromSourcingConfig(SourcingFactorIdentifiersEnum sourcingFactorId, SourcingConfigModel sourcingConfig) Create a single sourcing factor from the SourcingConfig.getAllSourcingFactorsForBaseStore(BaseStoreModel baseStore) Get the list of all the sourcing factors for the givenBaseStoreModel.getSourcingFactor(SourcingFactorIdentifiersEnum sourcingFactorId, BaseStoreModel baseStore) Create or retrieve the requested sourcing factor according to the sourcingFactorId and the baseStore given in parameter.protected 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.
-
Constructor Details
-
DefaultSourcingFactorService
public DefaultSourcingFactorService()
-
-
Method Details
-
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
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 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
-