Annotation Type I18N


  • @Target({METHOD,FIELD,PARAMETER})
    @Retention(RUNTIME)
    @InjectAnnotation
    public @interface I18N
    Injects I18n text into a field, based on the underlying resource in case of resource adaptation, or request. Note: not supported by the javax.Inject annotation because of performance reasons. Only direct annotation is supported.
    • Field Summary

      Fields 
      Modifier and Type Fields Description
      static String SOURCE
      Source value used for this annotation.
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      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.
      String value
      Represents the i18nKey
    • Field Detail

      • SOURCE

        static final String SOURCE
        Source value used for this annotation.
        See Also:
        Source
    • Element Detail

      • value

        String value
        Represents the i18nKey
        Returns:
        Default:
        ""
      • 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:
        org.apache.sling.models.annotations.injectorspecific.InjectionStrategy.DEFAULT