Class ComposedSingleModelItemsProperty<X extends ModelAwareDataAwareAmetysObject>

Type Parameters:
X - Type of ametys object supported by this property
All Implemented Interfaces:
Comparable<ModelItem>, Property<String,X>, CriterionDefinitionAwareElementDefinition<String,String,X>, IndexationAwareElementDefinition<String,X>, ElementDefinition<String>, ModelItem, PluginAware, Labelable, ModifiableLabelable, Configurable, Contextualizable, Serviceable

Property getting the first available value as string, supporting concatenation with default separator '-'.

For example, with this configuration:

 <items>
     <item ref="myNumericCode"/>
 </items>
 <items>
     <item ref="otherCode"/>
     <item ref="linkedContent/code"/>
 </items>
 <items separator="/">
     <item ref="alternativeCode"/>
     <item ref="linkedContent/code" optional="true"/>
 </items>
 
We will first search for "myNumericCode".
If empty, we will search for concatenation of "otherCode" and the "code" item on "linkedContent".
If empty, we will search for concatenation of "alternativeCode" and the "code" item on "linkedContent", even if this one is empty due to the optional attribute.
The first non-empty value is returned.
Otherwise, null is returned.

Referenced items have to be single. If a part of the path is multiple (repeater, multiple references, etc.), it will be rejected by a ConfigurationException.