Annotation Type ChildResourceFromRequest


@Target({METHOD,FIELD,PARAMETER}) @Retention(RUNTIME) @InjectAnnotation public @interface ChildResourceFromRequest
Annotation to inject a child (or list of child) resources using a request as the adaptable. This is used to overcome limitations in the `@ChildResource` injector in that it only injects a `Resource`, losing the context of the `SlingHttpServletRequest`. For any sling models that require a `SlingHttpServletRequest`, the loss of the `SlingHttpServletRequest` makes the `@ChildResource` injector an insufficient solution. See https://issues.apache.org/jira/browse/SLING-8279 for more context on the issue that this via provider solves.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    org.apache.sling.models.annotations.injectorspecific.InjectionStrategy
     
     
     
  • Element Details

    • name

      String name
      Default:
      ""
    • injectionStrategy

      org.apache.sling.models.annotations.injectorspecific.InjectionStrategy injectionStrategy
      Default:
      DEFAULT
    • via

      String via
      Default:
      ""