Class AbstractCMSComponentModelVisitor<CMSCOMPONENTTYPE extends AbstractCMSComponentModel>
- java.lang.Object
-
- de.hybris.platform.cmsfacades.synchronization.itemvisitors.AbstractCMSComponentModelVisitor<CMSCOMPONENTTYPE>
-
- Type Parameters:
CMSCOMPONENTTYPE
- the component type that extendsAbstractCMSComponentModel
- All Implemented Interfaces:
ItemVisitor<CMSCOMPONENTTYPE>
- Direct Known Subclasses:
AbstractCMSComponentContainerModelVisitor
,AbstractMediaContainerComponentModelVisitor
,CMSLinkComponentModelVisitor
,DefaultAbstractCMSComponentModelVisitor
,NavigationBarCollectionComponentModelVisitor
,NavigationBarComponentModelVisitor
,NavigationComponentModelVisitor
public abstract class AbstractCMSComponentModelVisitor<CMSCOMPONENTTYPE extends AbstractCMSComponentModel> extends java.lang.Object implements ItemVisitor<CMSCOMPONENTTYPE>
Abstract class for visitingAbstractCMSComponentModel
models for the cms synchronization service to work properly. In this implementation, it will collect all component's child (collection or not) extending or beingCMSItemModel
-
-
Constructor Summary
Constructors Constructor Description AbstractCMSComponentModelVisitor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
collectChildItems(CMSCOMPONENTTYPE source, java.util.List<ItemModel> toVisit, AttributeDescriptorModel attributeDescriptorModel)
Collects all child items of typeCMSItemModel
for the provided source component.protected AttributeDescriptorModelHelperService
getAttributeDescriptorModelHelperService()
protected java.lang.Object
getAttributeValue(CMSCOMPONENTTYPE source, AttributeDescriptorModel attributeDescriptorModel)
Gets the value by calling the getter for the attribute defined by the provided attribute descriptor.protected ModelService
getModelService()
protected TypeService
getTypeService()
protected boolean
isClassAssignableFrom(java.lang.Class clazz, AttributeDescriptorModel attributeDescriptor)
void
setAttributeDescriptorModelHelperService(AttributeDescriptorModelHelperService attributeDescriptorModelHelperService)
void
setModelService(ModelService modelService)
void
setTypeService(TypeService typeService)
java.util.List<ItemModel>
visit(CMSCOMPONENTTYPE source, java.util.List<ItemModel> arg1, java.util.Map<java.lang.String,java.lang.Object> arg2)
Returns visited items for a giventheSource
item within given contestctx
-
-
-
Method Detail
-
visit
public java.util.List<ItemModel> visit(CMSCOMPONENTTYPE source, java.util.List<ItemModel> arg1, java.util.Map<java.lang.String,java.lang.Object> arg2)
Description copied from interface:ItemVisitor
Returns visited items for a giventheSource
item within given contestctx
- Specified by:
visit
in interfaceItemVisitor<CMSCOMPONENTTYPE extends AbstractCMSComponentModel>
- Parameters:
source
- given itemarg1
- path to given itemarg2
- visitor context- Returns:
- relevant items for a given
theSource
item
-
collectChildItems
protected void collectChildItems(CMSCOMPONENTTYPE source, java.util.List<ItemModel> toVisit, AttributeDescriptorModel attributeDescriptorModel)
Collects all child items of typeCMSItemModel
for the provided source component.- Parameters:
source
- - the component which attributes is inspected to collect child itemstoVisit
- - the list of items collected which will be used by the synchronization serviceattributeDescriptorModel
- - the attribute descriptor object containing the information about the attribute of interest
-
getAttributeValue
protected java.lang.Object getAttributeValue(CMSCOMPONENTTYPE source, AttributeDescriptorModel attributeDescriptorModel)
Gets the value by calling the getter for the attribute defined by the provided attribute descriptor.When the attribute is not readable (due to configurations in *items.xml), the ModelService will return an
AttributeNotSupportedException
and the attribute will not be added to the list of items to visit by the synchronization service.- Parameters:
source
- - the source object which the getter method will be calledattributeDescriptorModel
- - the attribute descriptor object containing the information about the attribute of interest- Returns:
- the result of the getter; can be
NULL
-
isClassAssignableFrom
protected boolean isClassAssignableFrom(java.lang.Class clazz, AttributeDescriptorModel attributeDescriptor)
-
getTypeService
protected TypeService getTypeService()
-
setTypeService
public void setTypeService(TypeService typeService)
-
getModelService
protected ModelService getModelService()
-
setModelService
public void setModelService(ModelService modelService)
-
getAttributeDescriptorModelHelperService
protected AttributeDescriptorModelHelperService getAttributeDescriptorModelHelperService()
-
setAttributeDescriptorModelHelperService
public void setAttributeDescriptorModelHelperService(AttributeDescriptorModelHelperService attributeDescriptorModelHelperService)
-
-