Class TitleTypeProvider
- java.lang.Object
-
- com.adobe.cq.commerce.core.components.internal.models.v1.common.TitleTypeProvider
-
public class TitleTypeProvider extends Object
Simple class to avoid re-implementing the same method in all the Sling models with a title property for which the HTML tag can be configured.
-
-
Field Summary
Fields Modifier and Type Field Description protected static String
PN_TITLE_TYPE
The component itself uses thetitleType
property but the policy uses thetype
property so we can reuse thecore/wcm/components/commons/datasources/allowedheadingelements/v1
datasource from the WCM components.
-
Constructor Summary
Constructors Constructor Description TitleTypeProvider()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
getTitleType(com.day.cq.wcm.api.designer.Style currentStyle, org.apache.sling.api.resource.ValueMap properties)
Returns the HTML tag type for the title element.
-
-
-
Field Detail
-
PN_TITLE_TYPE
protected static final String PN_TITLE_TYPE
The component itself uses thetitleType
property but the policy uses thetype
property so we can reuse thecore/wcm/components/commons/datasources/allowedheadingelements/v1
datasource from the WCM components.- See Also:
- Constant Field Values
-
-
Method Detail
-
getTitleType
public static String getTitleType(com.day.cq.wcm.api.designer.Style currentStyle, org.apache.sling.api.resource.ValueMap properties)
Returns the HTML tag type for the title element.- Parameters:
currentStyle
- The style (policy) of the component.properties
- The properties of the component.- Returns:
- The HTML tag type that should be used to display the component title.
-
-