Set web console name hints for all configuration factories
All the @Designate annotations with factory=true attribute should be accompanied by an according property named webconsole.configurationFactory.nameHint. Otherwise the individual instances cannot be easily distinguished in the Felix Web Console. For further information look at http://felix.apache.org/documentation/subprojects/apache-felix-web-console.html#configuration-factories.
This currently affects the following classes
- CombinedCacheConfigExtension.java - acs-aem-commons-bundle/src/main/java/com/adobe/acs/commons/httpcache/config/impl
- DelegatingServletFactoryImpl.java - acs-aem-commons-bundle/src/main/java/com/adobe/acs/commons/util/impl (non-existing property
{prop.target-resource-type}referenced) - DispatcherFlushRulesImpl.java - acs-aem-commons-bundle/src/main/java/com/adobe/acs/commons/replication/dispatcher/impl (non-existing property
{prop.replication-action-type}referenced) - EnsureOakIndex.java - acs-aem-commons-bundle/src/main/java/com/adobe/acs/commons/oak/impl (non-existing property
{ensure-definitions.path}referenced) - GroupHttpCacheConfigExtension.java - acs-aem-commons-bundle/src/main/java/com/adobe/acs/commons/httpcache/config/impl (non-existing property
{httpcache.config.extension.user-groups.allowed}referenced, also the meaning of property "configName" is unclear) - HealthCheckStatusEmailer.java - acs-aem-commons-bundle/src/main/java/com/adobe/acs/commons/hc/impl (non-existing property
{recipients.email-addresses}referenced) - HttpCacheConfigImpl.java - acs-aem-commons-bundle/src/main/java/com/adobe/acs/commons/httpcache/config/impl
- HttpClientFactoryImpl.java - acs-aem-commons-bundle/src/main/java/com/adobe/acs/commons/http/impl
- MonthlyExpiresHeaderFilter.java - acs-aem-commons-bundle/src/main/java/com/adobe/acs/commons/http/headers/impl (non-existing property
{expires.day-of-month}referenced) - PageRootProviderConfig.java - acs-aem-commons-bundle/src/main/java/com/adobe/acs/commons/wcm/impl
- ResourceTypeHttpCacheConfigExtension.java - acs-aem-commons-bundle/src/main/java/com/adobe/acs/commons/httpcache/config/impl (non-existing property
{httpcache.config.extension.resource-types.allowed}referenced) - WeeklyExpiresHeaderFilter.java - acs-aem-commons-bundle/src/main/java/com/adobe/acs/commons/http/headers/impl (non-existing property
{expires.day-of-week}referenced)
It would be nice if these would be caught by the upcoming version of the osgicheck-maven-plugin. I opened https://issues.apache.org/jira/browse/FELIX-6039 to track that.
Closing as we are reverting back to SCR: https://github.com/Adobe-Consulting-Services/acs-aem-commons/issues/1741
@davidjgonzalez Even with Felix SCR annotations not all configuration factories have proper name hints. Can you please reopen?
@kwin as far as I can tell, the only open issues are the Combined* HttpCache features, and it looks like those are going to be removed. Do you see any other cases of missing/invalid name hints?
@justinedelson @kwin - I fixed a test for HttpCache on https://github.com/Adobe-Consulting-Services/acs-aem-commons/pull/1749 and just removed the Combined* code for 4.0.0 and logged https://github.com/Adobe-Consulting-Services/acs-aem-commons/issues/1750 to re-add later.
You can see the name hints on the HttpCache extensions in the screenshots in https://github.com/Adobe-Consulting-Services/acs-aem-commons/pull/1749
I've also added some code to the ScrMetadataIT that tests that (a) all factories set a nameHint and (b) all variables referred to by the nameHint are defined.
The test added in https://github.com/Adobe-Consulting-Services/acs-aem-commons/commit/4b3da3f5fdf0b59049b966bea9306d24c87d0293 does not work for component descriptors being generated by the Felix SCR generator, as those always contain Designate elements with both attributes pid and factoryPid e.g.
<Designate pid="com.adobe.acs.commons.http.impl.HttpClientFactoryImpl" factoryPid="com.adobe.acs.commons.http.impl.HttpClientFactoryImpl">
<Object ocdref="com.adobe.acs.commons.http.impl.HttpClientFactoryImpl"/>
</Designate>
while in fact only factoryPid should be generated. That leads to the fact that those are not detected as factories properly by the ScrMetadataIT. Most are still missing the nameHint property