Class DefaultItemService
java.lang.Object
de.hybris.platform.cms2.items.service.impl.DefaultItemService
- All Implemented Interfaces:
ItemService
Default implementation of
ItemService.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetItemByAttributeValues(String typeCode, Map<String, Object> attributeValues) Method retrieves anItemModelbased on typeCode and a list of attribute values.protected ItemDaogetOrCreateItemByAttributeValues(String typeCode, Map<String, Object> attributeValues) Method retrieves anItemModelbased on typeCode and a list of attribute values.voidsetItemDao(ItemDao itemDao) voidsetModelService(ModelService modelService)
-
Constructor Details
-
DefaultItemService
public DefaultItemService()
-
-
Method Details
-
getItemByAttributeValues
public ItemModel getItemByAttributeValues(String typeCode, Map<String, Object> attributeValues) throws ItemNotFoundExceptionMethod retrieves anItemModelbased on typeCode and a list of attribute values. The default implementation retrieves the item based on typeCode and the list of unique attributes.- Specified by:
getItemByAttributeValuesin interfaceItemService- Parameters:
typeCode- typeCode of theItemModelattributeValues- theMapof the attribute values where the key is a qualifier.- Returns:
- the
ItemModel - Throws:
ItemNotFoundException- if theItemModelcan not be found.
-
getOrCreateItemByAttributeValues
public ItemModel getOrCreateItemByAttributeValues(String typeCode, Map<String, Object> attributeValues) Description copied from interface:ItemServiceMethod retrieves anItemModelbased on typeCode and a list of attribute values. If the item does not exist the new one will be created.- Specified by:
getOrCreateItemByAttributeValuesin interfaceItemService- Parameters:
typeCode- typeCode of theItemModelattributeValues- theMapof the attribute values where the key is a qualifier.- Returns:
- the
ItemModel
-
getItemDao
-
setItemDao
-
getModelService
-
setModelService
-