jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rickard Öberg <rickard.ob...@senselogic.se>
Subject JCR, Portlets and usecases
Date Sun, 13 Feb 2005 06:02:28 GMT

Now that the PFD is out I want to air some thoughts about how JCR could 
work together with Portlets.

My background is that I have a CMS/portal implementing JSR168, and our 
partners are "screaming" (figuratively speaking) for a way to access our 
internal page structure and render it. This is where JCR would come in 
quite nicely.

Accessing the Repository from a portlet would be quite natural (simply 
look it up in the "java:comp/env" JNDI context), but I'm unsure how 
common usecases would be dealt with most efficiently.

Here is a common one just to describe the basic problem:
A portlet wants to render a menu describing the site structure. I would 
prefer if this is done by using the XML export feature in combination 
with an XSL transformation in the portlet. That way it is easy to tweak 
the actual HTML generation. But, since such a usecase is only interested 
in a small subset of data (e.g. path+displayname+UUID for one sublevel 
of the current node) the current XML export feature is too 
coarse-grained. It's an "all-or-nothing" approach. In terms of the 
current JCR API it would probably be more efficient to implement an 
ItemVisitor which exports a specific subset of the model to SAX. Such an 
ItemVisitor could probably be made totally generic, if one wants to. 
With a SAX-exporter that can be tweaked for various usecases it should 
be very easy and efficient to implement a number of common JCR+Portlet 

So here are my actual questions:
* Is anyone else going to use JCR in the context of portlets?
* If yes, how do you see it being used, commonly? As above, with 
XML(SAX)+XSL, or in some other way?
* Are there any tools, like the SAX-exporter outlined above, which 
could/should be made available within the Jackrabbit context?

Any other general thoughts related to JCR and Portlets would also be 
most welcome :-)


View raw message