Feature #29

support properties in the configuration

Added by sam g over 13 years ago. Updated almost 13 years ago.

Status:NewStart date:10/19/2010
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-
Resolution:

Description

like inMaven.

e.g. ${server.mode} will be replaced by the property server.mode, which can be either set via XML Entry in general.xml or via program during start-up or via commandLine-Parameter, e.g. -Dserver.mode=...

+ changing a single value in a deep located file, doesn't require to duplicate all immediate files
+ more flexible during startup

-> if the wrapper of the xml files is everywhere used, this could be transparent to all modules

further extension, is the support of interpolation variable handler, e.g. ${server.mode} <==> ${get:server.mode}, other possible handler could support simple default values: ${isset:server.mode:client}, toascii ${toascii:a} for input devices, and so on

History

#1 Updated by sam g almost 13 years ago

possible scenario:
a common thing is to switch between trackd and vrpn. Assuming that you have the ControllerManagerFiles called: trackd.xml and vrpn.xml you could specify within the inputInteface.xml:

  <module name="ControllerManager" configFile="${tracker}.xml"/>

and specify a property tracker=vrpn or tracker=trackd during startup of the application. Therefore you can specify during load time of the configuration, which TrackingLibrary you want to use.

Another scenario could be to specify, within the physcis module, whether the current application is the server or the client.

Another possible macro could you get access to environment variables, e.g. using ${env:HOSTNAME}

Also available in: Atom PDF