oracle.jcr

## Class OracleRepositoryFactory

- java.lang.Object
- - oracle.jcr.OracleRepositoryFactory

All Implemented Interfaces:
  javax.naming.spi.ObjectFactory

    public class OracleRepositoryFactory
    extends java.lang.Object
    implements javax.naming.spi.ObjectFactory

OracleRepositoryFactory creates OracleRepository objects.

An OracleRepository is the entry point to a content repository. Each OracleRepository object encapsulates an OracleRepositoryConfiguration which describes how that OracleRepository operates against the underlying content repository. There is a different OracleRepositoryConfiguration implementation for each type of content repository. For example, an XDBRepositoryConfiguration encapsulates the JDBC OracleDataSource by which an OracleRepository connects to an XML DB repository.

### Constructor Summary

Constructors
Constructor and Description
`OracleRepositoryFactory()` Default constructor.

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`static OracleRepository` `createOracleRepository()` Creates a default OracleRepository.
`static OracleRepository` `createOracleRepository(OracleRepositoryConfiguration repositoryConfiguration)` Creates an OracleRepository using the specified OracleRepositoryConfiguration.
`java.lang.Object` `getObjectInstance(java.lang.Object obj, javax.naming.Name name, javax.naming.Context nameCtx, java.util.Hashtable environment)` JNDI factory method to create an object using the location or reference information specified.

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### OracleRepositoryFactory

    public OracleRepositoryFactory()

Default constructor.

### Method Detail

#### createOracleRepository

    public static OracleRepository createOracleRepository()
                                                   throws RepositoryException

Creates a default OracleRepository.

This method dynamically constructs an OracleRepositoryConfiguration and uses it to create an OracleRepository. The system property named `oracle.jcr.OracleRepositoryConfiguration` must be set to the fully-qualified class name of the OracleRepositoryConfiguration.

The configuration of the selected OracleRepositoryConfiguration implementation may be influenced by additional system properties. For details, refer to the Javadoc of that class. If required, the OracleRepository may be further configured by calling its `getRepositoryConfiguration` method to get the OracleRepositoryConfiguration object and then calling the appropriate configuration methods on that OracleRepositoryConfiguration implementation.

Returns:
  the repository
Throws:
  `RepositoryException` - if the operation fails

#### createOracleRepository

    public static OracleRepository createOracleRepository(OracleRepositoryConfiguration repositoryConfiguration)
                                                   throws RepositoryException

Creates an OracleRepository using the specified OracleRepositoryConfiguration.

Parameters:
  `repositoryConfiguration` - the repository configuration; required
Returns:
  the repository
Throws:
  `RepositoryException` - if the operation fails

#### getObjectInstance

    public java.lang.Object getObjectInstance(java.lang.Object obj,
                                              javax.naming.Name name,
                                              javax.naming.Context nameCtx,
                                              java.util.Hashtable environment)
                                       throws java.lang.Exception

JNDI factory method to create an object using the location or reference information specified.

Specified by:
  `getObjectInstance` in interface `javax.naming.spi.ObjectFactory`
Parameters:
  `obj` - an object containing location or reference information that can be used in creating the object
  `name` - the name of the object relative to `nameCtx`, or null if no name is specified
  `nameCtx` - the context relative to which `name` is specified, or null if `name` is relative to the default initial context
  `environment` - the environment used in creating the object, or null
Returns:
  the created object
Throws:
  `java.lang.Exception` - if the operation fails

Copyright © 2003, 2018, Oracle and/or its affiliates. All rights reserved.