Page tree
Skip to end of metadata
Go to start of metadata
Your Rating: Results: 1 Star2 Star3 Star4 Star5 Star 82 rates

GREYCollection of proposed additions or improvements to Content2BeanGREY
There are already a couple of issues opened for Content2Bean (see below)

Here's just a collection of possible further ideas or improvements:

Annotations

There are a great deal of things we could do with annotations to "drive" content2bean.

@NullIfDisabled

It is cumbersome to add setEnabled methods in all beans converted by c2b. It's even more cumbersome to check for those in the code using those beans. Here's a proposal to add @NullIfDisabled: if a bean has this annotation, and the corresponding has an unused property (not associated to a bean property) named "enabled" and set to "false", or "disabled" and set to "true", the bean is nulled and not added to collections.

@CommaSeparated - or support for multi-valued properties

Often times, a bean needs to be configured with a List<String> or String[]. And in most of these cases, it's cumbersome to create sub-nodes for this list. If we don't support multi-valued properties in the tree (and in c2b!), perhaps an annotation on the bean itself could be introduced, indicating that the one string value should be converted by c2b to an array of strings. Example use-case: info.magnolia.externalindexing.salsa.WebsiteIndexGenerator#setElementsToFilter

Lifecycle

Some components are not useable, and should not be used, if not configured properly. Similar to @NullIfDisabled we could perhaps introduce an interface with a method such as isReady() which would validate the configuration's completeness ? (possibly throwing an exception or return a message of some sort)

Existing Jira issues

type key summary assignee reporter priority status resolution created updated due

Data cannot be retrieved due to an unexpected error.

View these issues in Jira