Annotation Type ContextAwareConfiguration


@Target({METHOD,FIELD,PARAMETER}) @Retention(RUNTIME) @InjectAnnotation public @interface ContextAwareConfiguration
Annotation to be used on either methods, fields or constructor parameters to let Sling Models inject a context-aware configuration. The annotation supports the same features and semantics as ConfigurationBuilder. For configuration collections, you can use arrays, List or Collection variables.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    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.
    Define configuration name.
  • Element Details

    • name

      String name
      Define configuration name. Optional if used together with a context-aware configuration annotation class, which implictely defines a configuration name.
      Returns:
      Configuration name
      Default:
      ""
    • injectionStrategy

      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