I have a component with has a parsys inside it.
Now on breaking the inheritance on a page for this component works flawlessly as expected.
Now for a different requirement i am provided a path, but i need to check if the provided path's inheritance is broken or on. How to achieve that?
FYI: I have been checking "cq:LiveSyncCancelled" mixin type is present or not. However it doesnt seem to work for the below scenario:
So my assumption of checking if the cq:LiveSyncCancelled is present or not is not a viable solution. Any API?
Solved! Go to Solution.
I am thinking on the other way like get the properties of the resource and check it inherited from parent or other resource:
HierarchyNodeInheritanceValueMap - This will help to retrieve the inherited properties from parent pages.
ResourceResolver resourceResolver = slingRequest.getResourceResolver();
String resourceContentPath = resourcePathURL<>;
Resource res = resourceResolver.getResource(resourceContentPath);
InheritanceValueMap inheritedProp = new HierarchyNodeInheritanceValueMap(res);
String prop1 = inheritedProp.getInherited(<property1>, String.class);