|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.jackrabbit.commons.AbstractRepository org.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
construction, deserialization, 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 |
static String |
REPHOMEDIR_ADDRTYPE
type of repHomeDir reference address |
Constructor Summary | |
---|---|
BindableRepository(Reference reference)
Creates a BindableRepository instance with the configuration information in the given JNDI reference. |
Method Summary | |
---|---|
protected JackrabbitRepository |
createRepository()
Creates a repository instance based on the contained JNDI reference. |
String |
getDescriptor(String key)
Delegated to the underlying repository instance. |
String[] |
getDescriptorKeys()
Delegated to the underlying repository instance. |
Value |
getDescriptorValue(String key)
Delegated to the underlying repository instance. |
Value[] |
getDescriptorValues(String key)
Delegated to the underlying repository instance. |
Reference |
getReference()
Returns the JNDI reference for this content repository. |
protected JackrabbitRepository |
getRepository()
Returns the underlying repository instance. |
boolean |
isSingleValueDescriptor(String key)
Delegated to the underlying repository instance. |
boolean |
isStandardDescriptor(String key)
Delegated to the underlying repository instance. |
Session |
login(Credentials credentials,
String workspaceName)
Delegated to the underlying repository instance. |
void |
shutdown()
Delegated to the underlying repository instance. |
Methods inherited from class org.apache.jackrabbit.commons.AbstractRepository |
---|
login, login, login |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.jcr.Repository |
---|
login, login, login |
Field Detail |
---|
public static final String CONFIGFILEPATH_ADDRTYPE
configFilePath
reference address
Reference.get(String)
,
Constant Field Valuespublic static final String REPHOMEDIR_ADDRTYPE
repHomeDir
reference address
Reference.get(String)
,
Constant Field ValuesConstructor Detail |
---|
public BindableRepository(Reference reference) throws RepositoryException
reference
- JNDI reference
RepositoryException
- if the repository can not be startedMethod Detail |
---|
protected JackrabbitRepository createRepository() throws RepositoryException
getReference()
method. The default implementation
returns a RepositoryImpl
instance.
RepositoryException
- if the repository could not be createdprotected JackrabbitRepository getRepository()
public Session login(Credentials credentials, String workspaceName) throws LoginException, NoSuchWorkspaceException, RepositoryException
login
in interface Repository
LoginException
NoSuchWorkspaceException
RepositoryException
public String getDescriptor(String key)
getDescriptor
in interface Repository
public String[] getDescriptorKeys()
getDescriptorKeys
in interface Repository
public Value getDescriptorValue(String key)
getDescriptorValue
in interface Repository
public Value[] getDescriptorValues(String key)
getDescriptorValues
in interface Repository
public boolean isSingleValueDescriptor(String key)
isSingleValueDescriptor
in interface Repository
public boolean isStandardDescriptor(String key)
isStandardDescriptor
in interface Repository
isStandardDescriptor
in class AbstractRepository
key
- descriptor key
true
if the key identifies a standard descriptor,
false
otherwisepublic Reference getReference()
getReference
in interface Referenceable
public void shutdown()
shutdown
in interface JackrabbitRepository
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |