Default value for symbol
Hi everyone,
I have a contribution where an attribute is defined with a symbol, see below:
<config myNewAttribute="${my.new.symbol}" ...
To fill this symbol with data at runtime, there is a properties file (myProps.properties)
my.new.symbol=The value
So far this works fine.
But there are some cases, where this properties file doesn´t exist already, so at runtime an error message appears, telling me that there is no value for that symbol
(org.apache.hivemind.impl.SymbolExpander : Error at...META-INF/hivemodule.xml, line 146, column 7: No value available for symbol 'my.new.symbol'.).
Off course not, because the properties file doesn´t exist where the value is get from.
My question is, if there is a possibility to set a default-value for a symbol, if it can´t be expanded by the SymbolExpander?
I tried to set the value with the <default> element.
<contribution configuration-id="hivemind.ApplicationDefaults">
<default symbol="my.new.symbol" value="DEFAULT" />
</contribution>
The problem here is, that at runtime the value for 'myNewAttribute' is 'DEFAULT' in any case, regardless if the value can be read from the properties file. i.e. if the symbol should be expanded by the SymbolExpander.
Thanks for your help in advance!
Regards,
Sebastian