Annotation Type TagProperty


@Target({METHOD,FIELD,PARAMETER}) @Retention(RUNTIME) @InjectAnnotation public @interface TagProperty
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
    boolean
    Specifies if it should use the hierarchy to search for the tag property.
    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.
    Specifies the name of the value from the value map to take.
  • Field Summary

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

  • Element Details

    • value

      String value
      Specifies the name of the value from the value map to take. If empty, then the name is derived from the method or field.
      Default:
      ""
    • inherit

      boolean inherit
      Specifies if it should use the hierarchy to search for the tag property. If false, it will only look at the current resource.
      Default:
      false
    • 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