Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 46666 invoked from network); 5 Mar 2004 11:19:54 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 5 Mar 2004 11:19:54 -0000 Received: (qmail 64938 invoked by uid 500); 5 Mar 2004 11:19:25 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 64696 invoked by uid 500); 5 Mar 2004 11:19:23 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 64680 invoked from network); 5 Mar 2004 11:19:23 -0000 Received: from unknown (HELO gateway.elsag.de) (134.98.65.18) by daedalus.apache.org with SMTP; 5 Mar 2004 11:19:23 -0000 Received: from vwall.elsag.de by gateway.elsag.de via smtpd (for daedalus.apache.org [208.185.179.12]) with SMTP; Fri, 5 Mar 2004 12:19:37 +0100 Received: from esmail by gateway.elsag.de via smtpd (for vwall.elsag.de [192.168.100.108]) with SMTP; Fri, 5 Mar 2004 12:19:36 +0100 X-MimeOLE: Produced By Microsoft Exchange V6.0.6249.0 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: [configuration] SubsetConfiguration Date: Fri, 5 Mar 2004 12:19:36 +0100 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [configuration] SubsetConfiguration Thread-Index: AcQCo20NrtepY6AvRw+YNrw6uSAL3QAADatQ From: =?iso-8859-1?Q?J=F6rg_Schaible?= To: "Jakarta Commons Developers List" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Emmanuel Bourg wrote on Friday, March 05, 2004 12:17 PM: > I tried to push the reasoning a bit further yesterday and > observed that > if there is a SubsetConfiguration shifting the parent keys to > the left, > we might imagine a SupersetConfiguration shifting the keys to > the right > by adding a prefix. Both classes could even be merged into a > TranslatedConfiguration. But what use case could require the addition > of a prefix to all the keys of a configuration ? I identified 2 > use cases: >=20 > - ini files, a section is basically a configuration translated to the > right by the section name.=20 >=20 > - configuration "mounting" in a CompositeConfiguration, to mix > heterogeneous configurations with identical keys into a unique > configuration. For example, given 2 configurations: >=20 > mail.properties: > server=3Dsmtp.xyz.com >=20 > database.properties: > server=3Ddb.xyz.com >=20 > One would mount the configuration into a > CompositeConfiguration to avoid > conflicts: >=20 > composite.addConfiguration(new TranslatedConfiguration(mail, > "mail")); composite.addConfiguration(new > TranslatedConfiguration(database, > "database")); >=20 > composite.getString("mail.server"); > composite.getString("database.server"); Nice idea! Regards, J=F6rg --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org