org.springframework.extensions.jcr
Interface JcrCallback
public interface JcrCallback
Callback interface for Jcr code. To be used with JcrTemplate's execute method, assumably often as anonymous
classes within a method implementation. The typical implementation will call Session.get/move/query to
perform some operations on the repository.
- Author:
- Costin Leau, Brian Moseley , Sergio Bossa, Salvatore Incandela
doInJcr
java.lang.Object doInJcr(javax.jcr.Session session)
throws java.io.IOException,
javax.jcr.RepositoryException
- Called by
JcrTemplate.execute(org.springframework.extensions.jcr.JcrCallback, boolean) within an active JCR javax.jcr.JCRSession. It is not
responsible for logging out of the Session or handling transactions. Allows for returning
a result object created within the callback, i.e. a domain object or a collection of domain objects. A
thrown RuntimeException is treated as an application exeception; it is propagated to the caller
of the template.
- Throws:
java.io.IOException
javax.jcr.RepositoryException
Copyright © 2009. All Rights Reserved.