Author: kwin Date: Fri Mar 24 12:04:14 2017 New Revision: 1788419 URL: http://svn.apache.org/viewvc?rev=1788419&view=rev Log: SLING-6658 document implicit adapter class
Modified: sling/site/trunk/content/documentation/bundles/models.mdtext Modified: sling/site/trunk/content/documentation/bundles/models.mdtext URL: http://svn.apache.org/viewvc/sling/site/trunk/content/documentation/bundles/models.mdtext?rev=1788419&r1=1788418&r2=1788419&view=diff ============================================================================== --- sling/site/trunk/content/documentation/bundles/models.mdtext (original) +++ sling/site/trunk/content/documentation/bundles/models.mdtext Fri Mar 24 12:04:14 2017 @@ -423,10 +423,14 @@ injectors in [Subversion](http://svn.apa By default, each model class is registered using its own implementation class as adapter. If the class has additional interfaces this is not relevant. The `@Model` annotations provides an optional `adapters` attribute which allows specifying under which type(s) the model -implementation should be registered in the Models Adapter Factory. With this property it is possible to register the model +implementation should be registered in the Models Adapter Factory. Prior to *Sling Models Impl 1.3.10* only the given class names +are used as adapter classes, since 1.3.10 the implementation class is always being registered implicitly as adapter as well (see [SLING-6658](https://issues.apache.org/jira/browse/SLING-6658)). +With this attribute it is possible to register the model to one (or multiple) interfaces, or a superclass. This allows separating the model interface from the implementation, which makes it easier to provide mock implementations for unit tests as well. +Prior to Sling Models 1.3.10 by default the model is only registered to the ones given in `adapters` if there. Since 1.3.10 + Example: ::java