Class CMSSmartEditDynamicAttributeService
java.lang.Object
de.hybris.platform.smarteditaddon.cms.services.impl.CMSSmartEditDynamicAttributeService
- All Implemented Interfaces:
CMSDynamicAttributeService
public class CMSSmartEditDynamicAttributeService
extends Object
implements CMSDynamicAttributeService
SmartEdit implementation of the
CMSDynamicAttributeService.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidafterAllItems(javax.servlet.jsp.PageContext pageContext) protected CMSComponentContainerRegistrygetDynamicComponentAttributes(AbstractCMSComponentModel component, ContentSlotModel contentSlot) Resolves dynamic attributes for the provided CMS component.getDynamicContentSlotAttributes(ContentSlotModel contentSlot, javax.servlet.jsp.PageContext pageContext, Map<String, String> initialMaps) Resolves dynamic attributes for the provided content slot.getFallbackElement(CMSItemModel cmsItemModel) will wrapp in a div any smarteditcomponent that is neither a NavigationBarComponent nor NavigationBarCollectionComponentprotected SessionServiceprotected UniqueItemIdentifierServiceprotected booleanChecks if smarteditaddon is enabled by checking the presence of a cmsTicketId in session.voidsetCmsComponentContainerRegistry(CMSComponentContainerRegistry cmsComponentContainerRegistry) voidsetSessionService(SessionService sessionService) voidsetUniqueItemIdentifierService(UniqueItemIdentifierService uniqueItemIdentifierService) protected booleanshouldTheComponentBeWrapped(AbstractCMSComponentModel component, ContentSlotModel contentSlot) Checks if the current component is neither the direct child of the containing contentSlot not the child of aAbstractCMSComponentContainerModel, and instead is nested within other CMS component.
-
Constructor Details
-
CMSSmartEditDynamicAttributeService
public CMSSmartEditDynamicAttributeService()
-
-
Method Details
-
getDynamicComponentAttributes
public Map<String,String> getDynamicComponentAttributes(AbstractCMSComponentModel component, ContentSlotModel contentSlot) Description copied from interface:CMSDynamicAttributeServiceResolves dynamic attributes for the provided CMS component.- Specified by:
getDynamicComponentAttributesin interfaceCMSDynamicAttributeService- Parameters:
component- the CMS component to resolve dynamic attributes forcontentSlot- the content slot holding the component- Returns:
Mapof dynamic attributes for the given CMS component
-
getDynamicContentSlotAttributes
public Map<String,String> getDynamicContentSlotAttributes(ContentSlotModel contentSlot, javax.servlet.jsp.PageContext pageContext, Map<String, String> initialMaps) Description copied from interface:CMSDynamicAttributeServiceResolves dynamic attributes for the provided content slot.- Specified by:
getDynamicContentSlotAttributesin interfaceCMSDynamicAttributeService- Parameters:
contentSlot- the content slot to resolve dynamic attributes forpageContext- the current page contextinitialMaps- the initial maps- Returns:
Mapof dynamic attributes for the given CMS content slot
-
afterAllItems
public void afterAllItems(javax.servlet.jsp.PageContext pageContext) - Specified by:
afterAllItemsin interfaceCMSDynamicAttributeService- Parameters:
pageContext- the current page context
-
getFallbackElement
will wrapp in a div any smarteditcomponent that is neither a NavigationBarComponent nor NavigationBarCollectionComponent- Specified by:
getFallbackElementin interfaceCMSDynamicAttributeService- 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 aAbstractCMSComponentContainerModel, 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.
-
getSessionService
-
setSessionService
-
getCmsComponentContainerRegistry
-
setCmsComponentContainerRegistry
public void setCmsComponentContainerRegistry(CMSComponentContainerRegistry cmsComponentContainerRegistry) -
getUniqueItemIdentifierService
-
setUniqueItemIdentifierService
-