Class ItemModelAttributePopulator
java.lang.Object
de.hybris.platform.inboundservices.persistence.populator.AbstractAttributePopulator
de.hybris.platform.inboundservices.persistence.populator.ItemModelAttributePopulator
- All Implemented Interfaces:
AttributePopulator
- Direct Known Subclasses:
ItemModelAttributePopulator
An implementation of an
AttributePopulator, that handles populating a ItemModels
attribute for a single items model reference TypeAttributeDescriptor.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanisApplicable(TypeAttributeDescriptor attribute, PersistenceContext context) Determines whether a specific implementation can provide value for the specified attribute.protected voidpopulateAttribute(ItemModel item, TypeAttributeDescriptor attribute, PersistenceContext context) Populates value of the specified item attribute.voidInjects implementation of the item reference service to be used for looking up items referenced in the attribute value.Methods inherited from class de.hybris.platform.inboundservices.persistence.populator.AbstractAttributePopulator
getModelService, isNew, populate, setModelService
-
Constructor Details
-
ItemModelAttributePopulator
public ItemModelAttributePopulator()
-
-
Method Details
-
isApplicable
Description copied from class:AbstractAttributePopulatorDetermines whether a specific implementation can provide value for the specified attribute.- Specified by:
isApplicablein classAbstractAttributePopulator- Parameters:
attribute- attribute to make the decision about.context- context that may be needed to make the decision.- Returns:
true, if this attribute processor is applicable to the specified attribute and can provide a value for it;false, otherwise.
-
populateAttribute
protected void populateAttribute(ItemModel item, TypeAttributeDescriptor attribute, PersistenceContext context) Description copied from class:AbstractAttributePopulatorPopulates value of the specified item attribute.- Specified by:
populateAttributein classAbstractAttributePopulator- Parameters:
item- item model to be populated.attribute- specifies, which attribute should be populated in theitem.context- context information necessary to derive correct attribute value from the integration item.
-
setContextReferencedItemModelService
Injects implementation of the item reference service to be used for looking up items referenced in the attribute value.- Parameters:
service- an implementation to use. If this method is not called or theserviceisnull, then the default implementation present in the application context and named 'contextReferenceItemModelService' is going to be used.
-