Jörn Nettingsmeier wrote:
> Markus Angst wrote:
>> Jörn Nettingsmeier wrote:
>>> but the publication should be *able* to override anything, right? 
>> The idea was that a command line property should be able to override even a
>> publication property, but i don't have very strong feelings about this
>> particular issue.
> 
> makes sense imho. i hadn't really thought of command line properties, 
> but yes, they should be the mostest mightiest.
> 
>>> so it ought to be at the beginning if the parsing follows "first one wins".
>> Regarding the point in time the publication properties are read in last (if
>> nobody else finds a better solution) so the order of precedence has to be 
>> kept
>> artificially by applying some magic (like leaving alone some properties with
>> particular name prefixes and overwriting others...).
> 
> ok, so then forget my remark about parsing order. it's "order of 
> precedence" then, which could be accomplished by
> if (property) {
>    remove(property);
>    add(property,otherSource);
> }

Yes. That's already done for system and publication properties (in
overwriteProperty()) but because the system properties are processed in
initialize() and the publication properties are lazy loaded - well just as i
write this i realize that this could probably be simplified by lazy loading the
system properties, too.

> i don't think prefixes should have an impact on whether a property can 
> be overridden. they should just be there to avoid *accidetal* overriding 
> when names clash.

I agree. Lazy loading the system properties would eliminate the magic i
mentioned above.

> i'm a little confused about some things:
> can there be a lenya.properties in the core (i.e. under webapp/lenya)?

Yes, there is one under webapp. It is even used, it contains a property of
arguable usefulness called

<property name="pubs.default.author" value="the Lenya community"/>,

which is used when creating a new document. Take the file away and Lenya will
complain. :-)

> can there be one lenya.properties per publication? 

Yes, that is the idea of the patch.

> or does that have to be local.lenya.properties? 

No. I think one properties file per publication would be enough.

> will template publications be taken into account? if so, we should mimic 
> (or better yet, re-use) an aggregating fallback behaviour with 
> last-one-wins as described above. 

Good point.

> are you doing that already?

Not that i am aware of, but i will have to check.

Thanks!
Markus Angst

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to