ResourceResolverFactory
@Deprecated public interface JcrResourceResolverFactory extends ResourceResolverFactory
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.
NEW_PASSWORD, PASSWORD, SUBSERVICE, USER, USER_IMPERSONATION
Modifier and Type | Method and Description |
---|---|
ResourceResolver |
getResourceResolver(javax.jcr.Session session)
Deprecated.
Returns a
ResourceResolver for the given session. |
getAdministrativeResourceResolver, getResourceResolver, getServiceResourceResolver, getThreadResourceResolver
ResourceResolver getResourceResolver(javax.jcr.Session session)
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 © 2015 The Apache Software Foundation. All rights reserved.