Class CMSSmartEditDynamicAttributeService

    • Constructor Detail

      • CMSSmartEditDynamicAttributeService

        public CMSSmartEditDynamicAttributeService()
    • Method Detail

      • getDynamicContentSlotAttributes

        public java.util.Map<java.lang.String,​java.lang.String> getDynamicContentSlotAttributes​(ContentSlotModel contentSlot,
                                                                                                      javax.servlet.jsp.PageContext pageContext,
                                                                                                      java.util.Map<java.lang.String,​java.lang.String> initialMaps)
        Specified by:
        getDynamicContentSlotAttributes in interface CMSDynamicAttributeService
        Parameters:
        contentSlot - the content slot to resolve dynamic attributes for
        pageContext - the current page context
        initialMaps - the initial maps
        Returns:
        Map of dynamic attributes for the given CMS content slot
      • afterAllItems

        public void afterAllItems​(javax.servlet.jsp.PageContext pageContext)
        Specified by:
        afterAllItems in interface CMSDynamicAttributeService
        Parameters:
        pageContext - the current page context
      • getFallbackElement

        public java.lang.String getFallbackElement​(CMSItemModel cmsItemModel)
        will wrapp in a div any smarteditcomponent that is neither a NavigationBarComponent nor NavigationBarCollectionComponent
        Specified by:
        getFallbackElement in interface CMSDynamicAttributeService
        Parameters:
        cmsItemModel -
        Returns:
      • isEnabled

        protected boolean isEnabled()
        Checks if smarteditaddon is enabled by checking the presence of a cmsTicketId in session.
        Returns:
        true if this dyanamic attribute service is enabled and false otherwise.
      • shouldTheComponentBeWrapped

        protected boolean shouldTheComponentBeWrapped​(AbstractCMSComponentModel component,
                                                      ContentSlotModel contentSlot)
        Checks if the current component is neither the direct child of the containing contentSlot not the child of a AbstractCMSComponentContainerModel, and instead is nested within other CMS component.
        Parameters:
        component - The component to verify.
        contentSlot - The slot containing the current component.
        Returns:
        true if it's a direct child or child of a AbstractCMSComponentContainerModel, false otherwise.
      • setSessionService

        public void setSessionService​(SessionService sessionService)
      • setCmsComponentContainerRegistry

        public void setCmsComponentContainerRegistry​(CMSComponentContainerRegistry cmsComponentContainerRegistry)
      • setUniqueItemIdentifierService

        public void setUniqueItemIdentifierService​(UniqueItemIdentifierService uniqueItemIdentifierService)