Class AbstractCMSComponentModelVisitor<CMSCOMPONENTTYPE extends AbstractCMSComponentModel>

    • Constructor Detail

      • AbstractCMSComponentModelVisitor

        public AbstractCMSComponentModelVisitor()
    • 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 given theSource item within given contest ctx
        Specified by:
        visit in interface ItemVisitor<CMSCOMPONENTTYPE extends AbstractCMSComponentModel>
        Parameters:
        source - given item
        arg1 - path to given item
        arg2 - 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 type CMSItemModel for the provided source component.
        Parameters:
        source - - the component which attributes is inspected to collect child items
        toVisit - - the list of items collected which will be used by the synchronization service
        attributeDescriptorModel - - 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 called
        attributeDescriptorModel - - 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)