Feature #120

[Configuration] Allow user to define constants

Added by Thomas Chemineau 10 months ago. Updated 2 months ago.

Status:Assigned Start:07/10/2009
Priority:Normal Due date:
Assigned to:Rémy-Christophe Schermesser % Done:

0%

Category:Core
Target version:1.4.x branch

Description

It could be very useful to allow user defining constants. It could be implemented as properties that could be reuse in other LSC properties.

For example, if I define:

lsc.constants.ouToSync = "OU=CLIENTS"

Then I would like to reuse it as the following:

lsc.tasks.ldap2adUpdate.dn = \"cn=\" + srcBean.getAttributeValueById(\"cn\") + \",\" + lsc.constants.ouToSync


Related issues

related to Feature #18: Change the configuration format to something more adaptable Feedback 02/01/2009

History

Updated by Rémy-Christophe Schermesser 8 months ago

  • Status changed from New to Feedback

In fact, you can already do that.

As we use properties files for configuration you can define a property :

my.constant = "OU=CLIENTS"

And then use it like this :

lsc.tasks.ldap2adUpdate.dn = \"cn=\" + srcBean.getAttributeValueById(\"cn\") + \",\" + ${my.constant}

Can someone try this ?

I do not really know when Java is replacing the ${my.constant} by the real value.

Updated by Rémy-Christophe Schermesser 7 months ago

  • Target version changed from 1.2.x branch to 1.2.0

Updated by Jonathan Clarke 6 months ago

Does anyone have an idea on how to do this using properties?

If not, should we retarget this issue for 1.3, when we'll be using the new configuration format anyway (issue #18)?

Updated by Rémy-Christophe Schermesser 6 months ago

I think that Jon tested the ${my.constant} way in a property file, and it does not work.

We should postponed this issue to the 1.3

Updated by Thomas Chemineau 6 months ago

OK for me to be in 1.3.
This is a good feature, particularly when I have a lot of synchronization tasks to manage, and want to change quickly some settings.

Updated by Jonathan Clarke 6 months ago

  • Status changed from Feedback to Assigned
  • Assigned to set to Rémy-Christophe Schermesser
  • Target version changed from 1.2.0 to 1.3.x branch

OK, retargeting for 1.3, with the new configuration format as described in #18. Assigning to you, Rémy, like #18.

Updated by Sébastien Bahloul 2 months ago

  • Target version changed from 1.3.x branch to 1.4.x branch

Retargeted

Also available in: Atom PDF