Package org.apache.sling.jcr.base.util
Class RepositoryAccessor
java.lang.Object
org.apache.sling.jcr.base.util.RepositoryAccessor
Deprecated.
No longer supported
Access a Repository via JNDI or RMI.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Deprecated.static final String
Deprecated.Name of the property that the jcr client and server bundles to override their default configuration settings and connect to the specified repository instead (SLING-254 and SLING-260)static final String
Deprecated. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected org.apache.jackrabbit.rmi.client.ClientRepositoryFactory
Deprecated.No longer supportedprotected org.apache.jackrabbit.rmi.client.LocalAdapterFactory
Deprecated.No longer supportedjavax.jcr.Repository
getRepository
(String repositoryName, Hashtable<String, Object> jndiContext) Deprecated.No longer supportedjavax.jcr.Repository
Deprecated.No longer supported
-
Field Details
-
RMI_PREFIX
Deprecated.Prefix for RMI Repository URLs- See Also:
-
JNDI_PREFIX
Deprecated.Prefix for JNDI Repository URLs- See Also:
-
REPOSITORY_URL_OVERRIDE_PROPERTY
Deprecated.Name of the property that the jcr client and server bundles to override their default configuration settings and connect to the specified repository instead (SLING-254 and SLING-260)- See Also:
-
-
Constructor Details
-
RepositoryAccessor
public RepositoryAccessor()Deprecated.
-
-
Method Details
-
getRepository
@Deprecated public javax.jcr.Repository getRepository(String repositoryName, Hashtable<String, Object> jndiContext) Deprecated.No longer supportedFirst try to access the Repository via JNDI (unless jndiContext is null), and if not successful try RMI.- Parameters:
repositoryName
- JNDI name or RMI URL (must start with "rmi://") of the RepositoryjndiContext
- if null, JNDI is not tried- Returns:
- a Repository, or null if not found
- Throws:
UnsupportedOperationException
- Always throwsUnsupportedOperationException
-
getRepositoryFromURL
Deprecated.No longer supportedAcquire a Repository from the given URL- Parameters:
url
- for RMI, an RMI URL. For JNDI, "jndi://", followed by the JNDI repository name, followed by a colon and a comma-separated list of JNDI context values, for example:jndi://jackrabbit:java.naming.factory.initial=org.SomeClass,java.naming.provider.url=http://foo.com
- Returns:
- the repository for the given url
- Throws:
UnsupportedOperationException
- Always throwsUnsupportedOperationException
-
getLocalAdapterFactory
Deprecated.No longer supportedReturns theLocalAdapterFactory
used to convert Jackrabbit JCR RMI remote objects to local JCR API objects.This method returns an instance of the
JackrabbitClientAdapterFactory
which allows accessing Jackrabbit (or Jackrabbit-based) repositories over RMI. Extensions of this class may overwrite this method to use a different implementation.- Returns:
- the
LocalAdapterFactory
used to convert Jackrabbit JCR RMI remote objects to local JCR API objects. - Throws:
UnsupportedOperationException
- Always throwsUnsupportedOperationException
-
getClientRepositoryFactory
@Deprecated protected org.apache.jackrabbit.rmi.client.ClientRepositoryFactory getClientRepositoryFactory()Deprecated.No longer supportedReturns theClientRepositoryFactory
to access the remote JCR repository over RMI.This method creates an instance of the
ClientRepositoryFactory
class initialized with theLocalAdapterFactory
returned from thegetLocalAdapterFactory()
method. Extensions may overwrite this method to return an extension of the Jackrabbit JCR RMIClientRepositoryFactory
class.- Returns:
- the
ClientRepositoryFactory
to access the remote JCR repository over RMI. - Throws:
UnsupportedOperationException
- Always throwsUnsupportedOperationException
-