jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dürig <mdue...@apache.org>
Subject Re: Problem retrieving NodeId (SPI)
Date Thu, 19 Apr 2012 18:08:09 GMT

On 19.4.12 17:34, Gonzalo Vasquez wrote:
> Understood! "All over the place" seems to be the key, but under that
> conditions how do I retrieve the root NodeId? I guess using the the
> RepositoryService might help, but the only method I can think of is the
> executeQuery, isn't there an equivalent for Session.getRootNode() from
> javax.jcr? I need to traverse a tree of nodes prior to the batch insert
> process.


What are you trying to achieve here? If you implement the SPI, you 
basically have to implement the RepositoryService interface. In that 
casse you don't get the root NodeId from anywhere, but you rather have 
to supply it yourself. See PathFactory and IdFactory.


> Any SPI code tutorials available?
> *Gonzalo Vásquez Sáez*
> *Gerente Investigación y Desarrollo (R&D)*
> *Altiuz*Soluciones Tecnológicas de Negocios Ltda.
> Av. Nueva Tajamar 555 Of. 802, Las Condes
> (56-2) 335 2461
> _gvasquez@altiuz.c <mailto:gcoppa@altiuz.com>l_
> ___http://www.altiuz.cl <http://www.altiuz.cl/>_
> El 19-04-2012, a las 11:18, Julian Reschke escribió:
>> On 2012-04-18 16:53, Gonzalo Vasquez wrote:
>>> I'm trying to use the org.apache.jackrabbit.spi.Batch class methods
>>> provided by the SPI package (jackrabbit-spi-2.4.1.jar), but I'm having
>>> trouble discovering how to get the NodeId param as the one it needs is
>>> from the spi package, not from the core one. Some Helper / Factory class
>>> perhaps?
>>> Any ideas would be appreciated!
>>> Regards,
>>> ...
>> The Batch class is needed to implement write operations in an SPI
>> implementation. In which case, you should be using spi.NodeIds all
>> over the place...
>> Can you clarify what you're trying to do?
>> Best regards, Julian

View raw message