Author: kwin
Date: Fri May 13 08:28:23 2016
New Revision: 1743616

URL: http://svn.apache.org/viewvc?rev=1743616&view=rev
Log:
clarify documentation on resource-path injector

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=1743616&r1=1743615&r2=1743616&view=diff
==============================================================================
--- sling/site/trunk/content/documentation/bundles/models.mdtext (original)
+++ sling/site/trunk/content/documentation/bundles/models.mdtext Fri May 13 
08:28:23 2016
@@ -356,6 +356,11 @@ Injectors are invoked in order of their
 `@Default`
 :   set default values for a field or method
 
+`@Path`
+:   only used together with the resource-path injector to specify the path of 
a resource
+
+In addition all [injector-specific 
annotations](#injector-specific-annotations).
+
 # Available Injectors
 
 Title              |  Name (for `@Source`)   | Service Ranking     | Available 
Since (Implementation Version) | Description  | Applicable To (including using 
`@Via`) | Accepts Null Name? | Array Support | Parameterized Type Support
@@ -365,13 +370,13 @@ Value Map          | `valuemap`
 Child Resources    | `child-resources`       | 3000                | 1.0.0     
                               | Gets a child resource by name. | `Resource` 
objects | no | none | if a parameterized type is passed, a `List<Resource>` is 
returned (the contents of which may be adapted to the target type).
 Request Attributes | `request-attributes`    | 4000                | 1.0.0     
                               | Get a request attribute by name. | 
`ServletRequest` objects | no | no conversion is done | If a parameterized type 
is passed, the request attribute must be of a compatible type of the 
parameterized type.
 OSGi Services      | `osgi-services`         | 5000                | 1.0.0     
                               | Lookup services based on class name. Since 
Sling Models Impl 1.2.8 
([SLING-5664](https://issues.apache.org/jira/browse/SLING-5664)) the service 
with the highest service ranking is returned. In case multiple services are 
returned, they are ordered descending by their service ranking (i.e. the one 
with the highest ranking first). | Any object | yes | yes | Parameterized 
`List` and `Collection` injection points are injected by getting an array of 
the services and creating an unmodifiable `List` from the array.
-Resource Path      | `resource-path`         | 2500                | 1.1.0     
                               | Injects a resource by its path derived from 
the name. | `Resource` or `SlingHttpServletRequest` objects | yes | none | none
+Resource Path      | `resource-path`         | 2500                | 1.1.0     
                               | Injects one or multiple resources. The 
resource paths are either given by `@Path` annotations, the element `path` or 
`paths` of the annotation `@ResourcePath` or by paths given through a resource 
property being referenced by either `@Named` or element `name` of the 
annotation `@ResourcePath`. | `Resource` or `SlingHttpServletRequest` objects | 
yes | yes | none
 Self               | `self`                  | `Integer.MAX_VALUE` | 1.1.0     
                               | Injects the adaptable object itself (if the 
class of the field matches or is a supertype). If the @Self annotation is 
present it is tried to adapt the adaptable to the field type.  | Any object | 
yes | none | none
 Sling Object       | `sling-object`          | `Integer.MAX_VALUE` | 1.1.0     
                               | Injects commonly used sling objects if the 
field matches with the class: request, response, resource resolver, current 
resource, SlingScriptHelper. This works only if the adaptable can get the 
according information, i.e. all objects are available via 
`SlingHttpServletRequest` while `ResourceResolver` can only resolve the 
`ResourceResolver` object and nothing else. A discussion around this limitation 
can be found at [SLING-4083](https://issues.apache.org/jira/browse/SLING-4083). 
Also `Resource`s can only be injected if the according injector-specific 
annotation is used (`@SlingObject`). | `Resource`, `ResourceResolver` or 
`SlingHttpServletRequest` objects (not all objects can be resolved by all 
adaptables).  | yes | none | none
 
-# Injector-specific Annotations (Since Sling Models Impl 1.0.6)
+# Injector-specific Annotations
 
-*See also  [SLING-3499](https://issues.apache.org/jira/browse/SLING-3499)*
+*Introduced with 
[SLING-3499](https://issues.apache.org/jira/browse/SLING-3499) in Sling Models 
Impl 1.0.6*
 
 Sometimes it is desirable to use customized annotations which aggregate the 
standard annotations described above. This will generally have
 the following advantages over using the standard annotations:


Reply via email to