Interface ProductConfigurationSomService
-
- All Known Implementing Classes:
DefaultProductConfigurationService
public interface ProductConfigurationSomServiceHandles product configuration for cart entries: Maintains the session attributes, converts an external representation into a runtime object and vice versa.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ConfigModelgetConfigModel(java.lang.String productCode, java.lang.String externalConfiguration)Creates a configuration runtime representation from a product and an external configuration.java.lang.StringgetExternalConfiguration(java.lang.String itemKey)To get external configuration.java.lang.StringgetGetConfigId(java.lang.String itemKey)Returns the configuration ID, supposed it is available in the hybris sessionjava.lang.DoublegetTotalPrice(java.lang.String itemKey)Returns the configuration total price, supposed the configuration ID is available in the hybris session.booleanisInSession(java.lang.String itemKey)To check if key is in sessionvoidsetIntoSession(java.lang.String itemKey, java.lang.String configId)Sets ID of Product Configuration session into hybris session to enable UI for reconfiguration
-
-
-
Method Detail
-
setIntoSession
void setIntoSession(java.lang.String itemKey, java.lang.String configId)Sets ID of Product Configuration session into hybris session to enable UI for reconfiguration- Parameters:
itemKey- Key of cart item. Corresponds to theBusinessObject.getHandle()attribute of the BOL item, or to the cart entry PK of the hybris cart in case the backend is downconfigId- ID of the configuration runtime object. The configurator is capable of accessing the session via this ID
-
isInSession
boolean isInSession(java.lang.String itemKey)
To check if key is in session- Parameters:
itemKey- Key of cart item. Corresponds to theBusinessObject.getHandle()attribute of the BOL item, or to the cart entry PK of the hybris cart in case the backend is down- Returns:
- Is a configuration is already available in the hybris session?
-
getExternalConfiguration
java.lang.String getExternalConfiguration(java.lang.String itemKey)
To get external configuration.- Parameters:
itemKey- Key of cart item. Corresponds to theBusinessObject.getHandle()attribute of the BOL item, or to the cart entry PK of the hybris cart in case the backend is down- Returns:
- The external configuration, supposed the configuration is available in the hybris session
-
getConfigModel
ConfigModel getConfigModel(java.lang.String productCode, java.lang.String externalConfiguration)
Creates a configuration runtime representation from a product and an external configuration.- Parameters:
productCode- Product IDexternalConfiguration- external configuration as XML string- Returns:
- Configuration runtime representation
-
getTotalPrice
java.lang.Double getTotalPrice(java.lang.String itemKey)
Returns the configuration total price, supposed the configuration ID is available in the hybris session.- Parameters:
itemKey- Key of cart item. Corresponds to theBusinessObject.getHandle()attribute of the BOL item, or to the cart entry PK of the hybris cart in case the backend is down- Returns:
- Total price
-
getGetConfigId
java.lang.String getGetConfigId(java.lang.String itemKey)
Returns the configuration ID, supposed it is available in the hybris session- Parameters:
itemKey- item key- Returns:
- Configuration ID
-
-