Annotation Type AemObject


@Target({METHOD,FIELD,PARAMETER}) @Retention(RUNTIME) @InjectAnnotation public @interface AemObject
Sling Models Injector which injects the Adobe AEM objects defined in <cq:defineObjects/>.

the following objects can be injected:

  • resource the current resource
  • resourceResolver the current resource resolver
  • componentContext component context of this request
  • pageManager page manager
  • currentPage containing page addressed by the request
  • resourcePage containing page of the addressed resource
  • designer the designer
  • currentDesign design of the addressed resource
  • resourceDesign design of the addressed resource
  • currentStyle style addressed by the request
  • session the current session
  • xssApi cross site scripting provider for the current request
Note: This can only be used together with Sling Models API bundle in version 1.2.0
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    org.apache.sling.models.annotations.injectorspecific.InjectionStrategy
    if set to REQUIRED injection is mandatory, if set to OPTIONAL injection is optional, in case of DEFAULT the standard annotations (Optional, Required) are used.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Source value used for this annotation.
  • Field Details

  • Element Details

    • injectionStrategy

      org.apache.sling.models.annotations.injectorspecific.InjectionStrategy injectionStrategy
      if set to REQUIRED injection is mandatory, if set to OPTIONAL injection is optional, in case of DEFAULT the standard annotations (Optional, Required) are used. If even those are not available the default injection strategy defined on the Model applies. Default value = DEFAULT.
      Default:
      DEFAULT