portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ate Douma <...@douma.nu>
Subject Re: Adding Required Spring Categories Metadata for Filtering
Date Wed, 18 Feb 2009 15:39:17 GMT
Hi Randy,

See inline comments below.

Randy Watler wrote:
> Gang,
> 
> I have been pondering how to add a switch type flag to be used to select 
> cross component technology implementations within the Spring 
> configurations for J2. I am pondering categories like 'ojb' and 'jpa'. 
> To be honest, I really am not convinced that filter/categories is the 
> greatest solution, but I am trying to work with it.
> 
> The filtering logic seems to be strictly an 'OR' operation. In other 
> words, if any category defined in the meta data matches the current 
> category set, the bean is included. Selecting cross concerns like 'ojb' 
> or 'jpa' might be easier to specify as an 'AND' operation. Basically, I 
> want to say something like: "use this bean only if a specific category 
> is defined" in addition to the existing categories logic.
> 
> I am doubling down on the complexity for sure, but I am wondering if 
> this approach would have any objectors? Perhaps it is already 
> implemented? Just checking first before I go down the path. All feedback 
> welcome.
You're assessment is correct: *currently* filtering only works using 'OR' operations.
Adding 'AND' (and likely '!') operations definitely would be very helpful but so far we haven't
had time (nor real need) to add that.
Doing so probably shouldn't be too difficult to do.
The current 'OR' handling is handled in the JetspeedBeanDefinitionFilter.match() method, and
it simply parses the list of categories 
specified for a bean and see if any of those match the configured categories.
Adding 'AND' and '!' logic probably can be add very easily by checking if a specified category
starts with a '+' (AND) or '-' (NOT) and then 
deal with it accordingly.

I surely see no objections to adding such functionality!

Regards,

Ate
> 
> Randy
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-dev-help@portals.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message