Class DefaultItemService
- java.lang.Object
-
- de.hybris.platform.cms2.items.service.impl.DefaultItemService
-
- All Implemented Interfaces:
ItemService
public class DefaultItemService extends java.lang.Object implements ItemService
Default implementation ofItemService.
-
-
Constructor Summary
Constructors Constructor Description DefaultItemService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ItemModelgetItemByAttributeValues(java.lang.String typeCode, java.util.Map<java.lang.String,java.lang.Object> attributeValues)Method retrieves anItemModelbased on typeCode and a list of attribute values.protected ItemDaogetItemDao()ModelServicegetModelService()ItemModelgetOrCreateItemByAttributeValues(java.lang.String typeCode, java.util.Map<java.lang.String,java.lang.Object> attributeValues)Method retrieves anItemModelbased on typeCode and a list of attribute values.voidsetItemDao(ItemDao itemDao)voidsetModelService(ModelService modelService)
-
-
-
Method Detail
-
getItemByAttributeValues
public ItemModel getItemByAttributeValues(java.lang.String typeCode, java.util.Map<java.lang.String,java.lang.Object> attributeValues) throws ItemNotFoundException
Method 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(java.lang.String typeCode, java.util.Map<java.lang.String,java.lang.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
protected ItemDao getItemDao()
-
setItemDao
public void setItemDao(ItemDao itemDao)
-
getModelService
public ModelService getModelService()
-
setModelService
public void setModelService(ModelService modelService)
-
-