Annotation Type Model
-
@Target(TYPE) @Retention(RUNTIME) @Documented public @interface Model
Mark a class as adaptable via Sling Models.
-
-
Required Element Summary
Required Elements Modifier and Type Required Element Description java.lang.Class<?>[]
adaptables
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description java.lang.Class<?>[]
adapters
boolean
cache
java.lang.String
condition
DefaultInjectionStrategy
defaultInjectionStrategy
java.lang.String[]
resourceType
ValidationStrategy
validation
-
-
-
-
adapters
java.lang.Class<?>[] adapters
- Returns:
- List of classes to which can be adapted. If missing, the class that is annotated is used. If classes are given, they have to be either the annotated class itself, or interfaces or super classes of the class. The annotated class itself is always implicitly added to the adapters and does not need to be listed explicitly here.
- Default:
- {}
-
-
-
defaultInjectionStrategy
DefaultInjectionStrategy defaultInjectionStrategy
- Returns:
- Default injection strategy (optional or required)
- Default:
- org.apache.sling.models.annotations.DefaultInjectionStrategy.REQUIRED
-
-
-
validation
ValidationStrategy validation
- Returns:
ValidationStrategy.DISABLED
in case the model should not be validated through Sling Validation (default),ValidationStrategy.REQUIRED
in case the model should be validated and if no appropriate Sling Validation Model exists it is considered invalid orValidationStrategy.OPTIONAL
in case the model should be validated only in case an appropriate Sling Validation Model is found.- See Also:
- Sling Validation
- Default:
- org.apache.sling.models.annotations.ValidationStrategy.DISABLED
-
-