Hello Community
We have a required to Customize CA Config where we need to have property in all the CA Configs and use this for our business functionality
Example as below. As shown isGlobalPropetry is repeating for N CAConfigs. Is there a way to have this available for any CA Config we will have for both present and the future ones?
public @interface CAConfig1 {
@Property(label = "Some label 1", description = "Some description 1", order = 30)
String property1();
@Property(label = "Global Property", description = "Some description", order = 50)
boolean isGlobalPropetry() default true;
}
public @interface CAConfig2 {
@Property(label = "Some label 2", description = "Some description 2", order = 30)
String property2();
@Property(label = "Global Property", description = "Some description", order = 50)
boolean isGlobalPropetry() default true;
}
public @interface CAConfig3 {
@Property(label = "Some label 3", description = "Some description 3", order = 30)
String property3();
@Property(label = "Global Property", description = "Some description", order = 50)
boolean isGlobalPropetry() default true;
}
.
.
.
.
.
.
.
public @interface CAConfigN {
@Property(label = "Some label N", description = "Some description N", order = 30)
String propertyN();
@Property(label = "Global Property", description = "Some description", order = 50)
boolean isGlobalPropetry() default true;
}
Views
Replies
Total Likes
Hi @ArunG_,
To avoid repeating the same @Property (like isGlobalPropetry) across all Context-Aware Configs (CA Configs) in AEM, inheritance or composition would seem like a natural solution - Unfortunately, Java annotations do not support inheritance the same way classes do. That means you cannot extend or inherit annotation properties directly.
Views
Replies
Total Likes
Agree. and we were thinking if there is any good solution for this rather than repeating
Views
Replies
Total Likes