|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.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)
The value of a single-value descriptor is found by passing the key for that descriptor to this method. |
Value[] |
getDescriptorValues(String key)
The value array of a multi-value descriptor is found by passing the key for that descriptor to this method. |
Reference |
getReference()
Returns the JNDI reference for this content repository. |
protected JackrabbitRepository |
getRepository()
Returns the underlying repository instance. |
boolean |
isSingleValueDescriptor(String key)
Returns true if key is a valid single-value
descriptor; otherwise returns false . |
boolean |
isStandardDescriptor(String key)
Returns true if key is a standard descriptor
defined by the string constants in this interface and false
if it is either a valid implementation-specific key or not a valid key. |
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)
Repository
key
is the key of a
multi-value descriptor or not a valid key this method returns
null
.
key
- a descriptor key.
public Value[] getDescriptorValues(String key)
Repository
key
is the key of a
single-value descriptor then this method returns that value as an array
of size one. If key
is not a valid key this method returns
null
.
key
- a descriptor key.
public boolean isSingleValueDescriptor(String key)
Repository
true
if key
is a valid single-value
descriptor; otherwise returns false
.
key
- a descriptor key.
public boolean isStandardDescriptor(String key)
Repository
true
if key
is a standard descriptor
defined by the string constants in this interface and false
if it is either a valid implementation-specific key or not a valid key.
key
- a descriptor key.
key
is a standard descriptor.public 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 |