Class CMSSmartEditDynamicAttributeService
- java.lang.Object
-
- de.hybris.platform.smarteditaddon.cms.services.impl.CMSSmartEditDynamicAttributeService
-
- All Implemented Interfaces:
CMSDynamicAttributeService
public class CMSSmartEditDynamicAttributeService extends java.lang.Object implements CMSDynamicAttributeService
SmartEdit implementation of theCMSDynamicAttributeService.
-
-
Constructor Summary
Constructors Constructor Description CMSSmartEditDynamicAttributeService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterAllItems(javax.servlet.jsp.PageContext pageContext)protected CMSComponentContainerRegistrygetCmsComponentContainerRegistry()java.util.Map<java.lang.String,java.lang.String>getDynamicComponentAttributes(AbstractCMSComponentModel component, ContentSlotModel contentSlot)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)java.lang.StringgetFallbackElement(CMSItemModel cmsItemModel)will wrapp in a div any smarteditcomponent that is neither a NavigationBarComponent nor NavigationBarCollectionComponentprotected SessionServicegetSessionService()protected UniqueItemIdentifierServicegetUniqueItemIdentifierService()protected booleanisEnabled()Checks 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.
-
-
-
Method Detail
-
getDynamicComponentAttributes
public java.util.Map<java.lang.String,java.lang.String> getDynamicComponentAttributes(AbstractCMSComponentModel component, ContentSlotModel contentSlot)
- 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 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:
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
public java.lang.String getFallbackElement(CMSItemModel cmsItemModel)
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
protected SessionService getSessionService()
-
setSessionService
public void setSessionService(SessionService sessionService)
-
getCmsComponentContainerRegistry
protected CMSComponentContainerRegistry getCmsComponentContainerRegistry()
-
setCmsComponentContainerRegistry
public void setCmsComponentContainerRegistry(CMSComponentContainerRegistry cmsComponentContainerRegistry)
-
getUniqueItemIdentifierService
protected UniqueItemIdentifierService getUniqueItemIdentifierService()
-
setUniqueItemIdentifierService
public void setUniqueItemIdentifierService(UniqueItemIdentifierService uniqueItemIdentifierService)
-
-