Package com.day.cq.wcm.commons.policy
Class ContentPolicyStyle
java.lang.Object
com.day.cq.wcm.commons.policy.ContentPolicyStyle
A compatibility wrapper using a content policy as a style.
The goal is to use components using the currentStyle binding with the new content policies, without the need
to change the component. This will not be a complete style implementation but rather focuses on the reading
of the map values.
- Since:
- 6.1
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()booleanbooleanentrySet()<T> TReturn named value converted to type T ornullif not existing.<T> Treturn named value converted to the type T of the default value or the default value if the named value does not existgetCell()Returns the cell of this stylegetDefiningPath(String name) Returns the cell path that defines the style property with the given name.getDefiningResource(String name) Returns the resource that defines the style property with the given name.Returns the design this style is defined in.getPath()Returns the path to this cell resourcegetSubStyle(String relPath) Returns a sub style for the give one, by virtually extending the cell stack.booleanisEmpty()keySet()voidintsize()values()Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
ContentPolicyStyle
-
-
Method Details
-
getDesign
Description copied from interface:StyleReturns the design this style is defined in. -
getPath
Description copied from interface:StyleReturns the path to this cell resource -
getCell
Description copied from interface:StyleReturns the cell of this style -
get
Description copied from interface:StyleReturn named value converted to type T ornullif not existing. Please note that this also supports aResourceclass as type in order to retrieve a style resource (e.g. image) -
get
Description copied from interface:Stylereturn named value converted to the type T of the default value or the default value if the named value does not exist -
getDefiningResource
Description copied from interface:StyleReturns the resource that defines the style property with the given name.- Specified by:
getDefiningResourcein interfaceStyle- Parameters:
name- name of the style property- Returns:
- resource or
null
-
getDefiningPath
Description copied from interface:StyleReturns the cell path that defines the style property with the given name.- Specified by:
getDefiningPathin interfaceStyle- Parameters:
name- name of the style property- Returns:
- path or
null
-
getSubStyle
Description copied from interface:StyleReturns a sub style for the give one, by virtually extending the cell stack.- Specified by:
getSubStylein interfaceStyle- Parameters:
relPath- relative path of the sub style.- Returns:
- the new style
-
size
public int size() -
isEmpty
public boolean isEmpty() -
containsKey
- Specified by:
containsKeyin interfaceMap<String,Object>
-
containsValue
- Specified by:
containsValuein interfaceMap<String,Object>
-
get
-
put
-
remove
-
putAll
-
clear
public void clear() -
keySet
-
values
-
entrySet
-