Class CxCMSDynamicAttributeService
- java.lang.Object
-
- de.hybris.platform.acceleratorcms.services.impl.DefaultCMSDynamicAttributeService
-
- de.hybris.platform.personalizationcms.service.CxCMSDynamicAttributeService
-
- All Implemented Interfaces:
CMSDynamicAttributeService,CMSItemPropertiesSupplier
public class CxCMSDynamicAttributeService extends DefaultCMSDynamicAttributeService implements CMSItemPropertiesSupplier
CxCMS service extending theDefaultCMSDynamicAttributeService.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classCxCMSDynamicAttributeService.AttributeNames
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.StringGROUP_NAMEprotected static CxCMSDynamicAttributeService.AttributeNamesJSP_NAMESprotected static CxCMSDynamicAttributeService.AttributeNamesSPA_NAMES
-
Constructor Summary
Constructors Constructor Description CxCMSDynamicAttributeService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.function.Predicate<CMSItemModel>getConstrainedBy()ThePredicateto test whether this supplier can be applied to providedCMSItemModeljava.util.Map<java.lang.String,java.lang.String>getDynamicComponentAttributes(AbstractCMSComponentModel component, ContentSlotModel contentSlot)java.util.Map<java.lang.String,java.lang.Object>getProperties(CMSItemModel itemModel)Returns aMapof properties.protected SessionServicegetSessionService()java.lang.StringgroupName()Method to provide the properties' group name.booleanisEnabled(CMSItemModel itemModel)Method to verify whether properties should be applied or not toCMSItemModel.protected voidpopulatePropertiesMap(java.util.Map<java.lang.String,? super java.lang.String> result, CMSItemModel itemModel, CxCMSDynamicAttributeService.AttributeNames names)voidsetSessionService(SessionService sessionService)-
Methods inherited from class de.hybris.platform.acceleratorcms.services.impl.DefaultCMSDynamicAttributeService
afterAllItems, getDynamicContentSlotAttributes, getFallbackElement
-
-
-
-
Field Detail
-
GROUP_NAME
protected static final java.lang.String GROUP_NAME
- See Also:
- Constant Field Values
-
JSP_NAMES
protected static final CxCMSDynamicAttributeService.AttributeNames JSP_NAMES
-
SPA_NAMES
protected static final CxCMSDynamicAttributeService.AttributeNames SPA_NAMES
-
-
Method Detail
-
groupName
public java.lang.String groupName()
Description copied from interface:CMSItemPropertiesSupplierMethod to provide the properties' group name.- Specified by:
groupNamein interfaceCMSItemPropertiesSupplier- Returns:
- the properties' group name.
-
getConstrainedBy
public java.util.function.Predicate<CMSItemModel> getConstrainedBy()
Description copied from interface:CMSItemPropertiesSupplierThePredicateto test whether this supplier can be applied to providedCMSItemModel- Specified by:
getConstrainedByin interfaceCMSItemPropertiesSupplier- Returns:
- the
Predicate
-
getProperties
public java.util.Map<java.lang.String,java.lang.Object> getProperties(CMSItemModel itemModel)
Description copied from interface:CMSItemPropertiesSupplierReturns aMapof properties.- Specified by:
getPropertiesin interfaceCMSItemPropertiesSupplier- Parameters:
itemModel- theCMSItemModel- Returns:
- the
Mapof properties.
-
getDynamicComponentAttributes
public java.util.Map<java.lang.String,java.lang.String> getDynamicComponentAttributes(AbstractCMSComponentModel component, ContentSlotModel contentSlot)
- Specified by:
getDynamicComponentAttributesin interfaceCMSDynamicAttributeService- Overrides:
getDynamicComponentAttributesin classDefaultCMSDynamicAttributeService- 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
-
populatePropertiesMap
protected void populatePropertiesMap(java.util.Map<java.lang.String,? super java.lang.String> result, CMSItemModel itemModel, CxCMSDynamicAttributeService.AttributeNames names)
-
isEnabled
public boolean isEnabled(CMSItemModel itemModel)
Description copied from interface:CMSItemPropertiesSupplierMethod to verify whether properties should be applied or not toCMSItemModel.- Specified by:
isEnabledin interfaceCMSItemPropertiesSupplier- Parameters:
itemModel- theCMSItemModel.- Returns:
- true if properties should be applied, false otherwise; default is true.
-
setSessionService
public void setSessionService(SessionService sessionService)
-
getSessionService
protected SessionService getSessionService()
-
-