cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apf...@vipsurf.de
Subject Handling Preconditions
Date Sun, 02 Jan 2000 08:55:34 GMT
Hi,

I'm missing a framework for handling preconditions in Cocoon. In my applications, I usually
have to validate a user against a database and check for pages he/she has already visited.
This could be easiliy achieved via preconditions: Before actually calling the Engine (or as
the first action of the engine itself), I'd call something like 

while(true) {
	Precondition pre = preconditions.getCondition(document);
	if(!pre.accomplished())
		doSomething();
}

In my special environment, I'd check for a valid DB-Connection ID and, if I don't find one,
redirect the user to a longin-page. 

This would also allow to handover "global" data (e.g. Connections) to the processors via the
parameter-map and would therefore eliminate the need to code this in the document itself (see
how SQLProcessor deals with connection - and with the potential security hazards associated
with this method)

Talking about the Sitemap Proposal:
Don't forget to add XCatalog-Support to your configuration file. This would dramatically reduce
customization efforts. 

Armin Pfarr 
Email: apfarr@vipsurf.de

Mime
View raw message