Shared Component Properties Injector
Available since version 3.17.0
Purpose
Provides convenience for for accessing Shared Properties as implemented by ACS Commons Shared Component Properties.
How to Use
The feature is very similar in usage to the standard ValueMapValue
annotation.
Example
@Model(adaptables = {SlingHttpServletRequest.class, Resource.class})
public final class SharedComponentPropsExampleModel {
@SharedValueMapValue(type = SharedComponentProperties.ValueTypes.SHARED)
private String sharedProp;
@SharedValueMapValue(type = SharedComponentProperties.ValueTypes.GLOBAL)
private String globalProp;
// type will be MERGED by default
@SharedValueMapValue
private String mergedProp;
}