Shared Component Properties Injector

Available since version 3.17.0


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.


@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
    private String mergedProp;