@LikesAEM,
In AEM, On our content path we use the property slign:configRef to pass the path of the context aware Siteconfiguration at this path we used to have one .xml file that will have all the parameters mapped with the fields your siteconfiguration.java file. and thus if you have an object of the .java file you will get those parameters easily.
For example:
1. In our site path at : /content/my-site/us/en_us/jcr:content, we have sling:configRef pointing to /conf/my-site/us/en_us
2. In our code base at /conf/my-site/us/en_us we have on sling folder type node named sling:configs
3. Under /conf/my-site/us/en_us/sling:configs we have created on .xml file with pid of the site configuration like
com.mysite.configurations.SiteConfiguration.xml
4. in the above file we pass all the parameter that will be mapped to SiteConfiguration.java like
Java:
@Property(label = "Site ID", description = "Configurable Site ID")
String siteID();
XML:
siteID="1"
Now in sling model you will be getting reference of the SiteConfiguration like
ConfigurationBuilder configBuilder = contentResource.adaptTo(ConfigurationBuilder.class);
if (null != configBuilder) {
siteConfig = configBuilder.as(SiteConfiguration.class);
}
And then from
siteConfig.siteID();
this is how you can get the value of context aware config.
Now you need to check what are step you missed.
Hope this will help.
Umesh Thakur