Interface JcrResourceResolverFactory

All Superinterfaces:

Deprecated. Since 2.1. Use the ResourceResolverFactory

public interface JcrResourceResolverFactory
extends ResourceResolverFactory

The JcrResourceResolverFactory interface defines the service interface to have JCR-based ResourceResolver instances created for JCR sessions.

This interface is not intended to be implemented by client applications. It is implemented by this bundle and the implementation registered as a service for use by client applications. This interface is deprecated. You should use ResourceResolverFactory instead. If you need a resource resolver based on an existing session you can create an authentication map just containing this session (using the key JcrResourceConstants.AUTHENTICATION_INFO_SESSION) and then call ResourceResolverFactory.getResourceResolver(java.util.Map) with exactly this map.

Field Summary
Fields inherited from interface
Method Summary
 ResourceResolver getResourceResolver(javax.jcr.Session session)
          Deprecated. Returns a ResourceResolver for the given session.
Methods inherited from interface
getAdministrativeResourceResolver, getResourceResolver

Method Detail


ResourceResolver getResourceResolver(javax.jcr.Session session)
Returns a ResourceResolver for the given session. Calling this method repeatedly returns a new instance on each call.

This method is equivalent to:

 Map<String, Object> authInfo = new HashMap<String, Object>();
 authInfo.put(SESSION, session);
 return getResourceResolver(authInfo);

Note: Closing the ResourceResolver returned by this method will not close the provided Session ! Likewise the provided Session should not be logged out before closing the returned ResourceResolver.

session - The JCR Session used by the created resource manager to access the repository.

Copyright © 2007-2011 The Apache Software Foundation. All Rights Reserved.