|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jackrabbit.core.jndi.BindableRepository
public class BindableRepository
A referenceable and serializable content repository proxy. This class implements the Proxy design pattern (GoF) for the Jackrabbit Repository implementation. The proxy implementation delays the instantiation of the actual Repository instance and implements serialization and JNDI referenceability by keeping track of the repository configuration parameters.
A BindableRepository instance contains the configuration file and home directory paths of a Jackrabbit repository. The separateinit() method is used to create a transient
RepositoryImpl instance to which all the
JCR API calls are delegated.
An instance of this class is normally always also initialized.
The uninitialized state is only used briefly during the static
create method and during
serialization and JNDI "referenciation".
A JVM shutdown hook is used to make sure that the initialized
repository is properly closed when the JVM shuts down. The
RegistryHelper.unregisterRepository(javax.naming.Context, String)
method should be used to explicitly close the repository if
needed.
| Field Summary | |
|---|---|
static String |
CONFIGFILEPATH_ADDRTYPE
type of configFilePath reference address (@see |
protected Repository |
delegatee
The delegate repository instance. |
static String |
REPHOMEDIR_ADDRTYPE
type of repHomeDir reference address (@see |
| Constructor Summary | |
|---|---|
protected |
BindableRepository(String configFilePath,
String repHomeDir)
Creates a BindableRepository instance with the given configuration information, but does not create the underlying repository instance. |
| Method Summary | |
|---|---|
protected Repository |
createRepository(RepositoryConfig config)
Creates a plain repository instance from a repository config. |
protected RepositoryConfig |
createRepositoryConfig(String configFilePath,
String repHomeDir)
Creates a repository configuration from a path to the repository.xml file and the repository home directory. |
String |
getDescriptor(String key)
Delegated to the underlying repository instance. |
String[] |
getDescriptorKeys()
Delegated to the underlying repository instance. |
Reference |
getReference()
Creates a JNDI reference for this content repository. |
protected void |
init()
Creates the underlying repository instance. |
Session |
login()
Delegated to the underlying repository instance. |
Session |
login(Credentials credentials)
Delegated to the underlying repository instance. |
Session |
login(Credentials credentials,
String workspaceName)
Delegated to the underlying repository instance. |
Session |
login(String workspaceName)
Delegated to the underlying repository instance. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String CONFIGFILEPATH_ADDRTYPE
configFilePath reference address (@see Reference.get(String)
public static final String REPHOMEDIR_ADDRTYPE
repHomeDir reference address (@see Reference.get(String)
protected transient Repository delegatee
init.
| Constructor Detail |
|---|
protected BindableRepository(String configFilePath,
String repHomeDir)
configFilePath - repository configuration file pathrepHomeDir - repository home directory path| Method Detail |
|---|
protected void init()
throws RepositoryException
RepositoryException - if the repository cannot be created
protected RepositoryConfig createRepositoryConfig(String configFilePath,
String repHomeDir)
throws ConfigurationException
configFilePath - path to the repository.xml file.repHomeDir - the repository home directory.
ConfigurationException - on configuration error.
protected Repository createRepository(RepositoryConfig config)
throws RepositoryException
config.
config - the repository configuration.
RepositoryException - if an error occurs while creating the
repository instance.
public Session login(Credentials credentials,
String workspaceName)
throws LoginException,
NoSuchWorkspaceException,
RepositoryException
login in interface RepositoryLoginException
NoSuchWorkspaceException
RepositoryException
public Session login(String workspaceName)
throws LoginException,
NoSuchWorkspaceException,
RepositoryException
login in interface RepositoryLoginException
NoSuchWorkspaceException
RepositoryException
public Session login()
throws LoginException,
RepositoryException
login in interface RepositoryLoginException
RepositoryException
public Session login(Credentials credentials)
throws LoginException,
RepositoryException
login in interface RepositoryLoginException
RepositoryExceptionpublic String getDescriptor(String key)
getDescriptor in interface Repositorypublic String[] getDescriptorKeys()
getDescriptorKeys in interface Repositorypublic Reference getReference()
getReference in interface Referenceable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||