|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.modeshape.jcr.JcrRepository
@ThreadSafe public class JcrRepository
Creates JCR sessions
to an underlying repository (which may be a federated repository).
This JCR repository must be configured with the ability to connect to a repository via a supplied
repository connection factory
and repository source name. An execution context
must also be supplied to enable working with the underlying ModeShape graph implementation to which this JCR
implementation delegates.
If credentials
are used to login, implementations must also implement one of the following
methods:
publicNote,AccessControlContext
getAccessControlContext(); publicLoginContext
getLoginContext();
attributes
on credentials are not supported. JCR SimpleCredentials
are also
not supported.
Nested Class Summary | |
---|---|
static class |
JcrRepository.DefaultOption
The default values for each of the JcrRepository.Option . |
protected class |
JcrRepository.DelegatingConnectionFactory
|
protected class |
JcrRepository.FederatedRepositoryContext
|
class |
JcrRepository.Metrics
This component is used internally to expose the metrics of a repository, and should not be used outside of the ModeShape codebase, as it will almost certainly change or be replaced in upcoming releases. |
static class |
JcrRepository.Option
The available options for the JcrRepository . |
static class |
JcrRepository.QueryLanguage
The set of supported query language string constants. |
static class |
JcrRepository.RebuildQueryIndexOnStartupOption
The possible values for the JcrRepository.Option.REBUILD_QUERY_INDEX_ON_STARTUP option. |
protected class |
JcrRepository.RepositoryObservationManager
|
protected static class |
JcrRepository.SourceWorkspacePair
|
static class |
JcrRepository.VersionHistoryOption
The possible values for the JcrRepository.Option.VERSION_HISTORY_STRUCTURE option. |
Field Summary | |
---|---|
protected static Map<JcrRepository.Option,String> |
DEFAULT_OPTIONS
The static unmodifiable map of default options, which are initialized in the static initializer. |
Fields inherited from interface org.modeshape.jcr.api.Repository |
---|
REPOSITORY_NAME, REPOSITORY_WORKSPACES, STANDARD_DESCRIPTORS |
Method Summary | |
---|---|
protected void |
addWorkspace(String workspaceName,
boolean isDefault)
|
protected ExecutorService |
backgroundService()
|
protected void |
createWorkspace(String workspaceName,
String clonedFromWorkspaceNamed)
Create a new workspace with the supplied name. |
protected void |
destroyWorkspace(String workspaceName,
org.modeshape.jcr.JcrWorkspace currentWorkspace)
Destroy the workspace with the supplied name. |
protected static Properties |
getBundleProperties()
|
protected static String |
getBundleProperty(String propertyName,
boolean required)
|
String |
getDescriptor(String key)
|
String[] |
getDescriptorKeys()
|
org.modeshape.jcr.JcrValue |
getDescriptorValue(String key)
|
org.modeshape.jcr.JcrValue[] |
getDescriptorValues(String key)
|
JcrRepository.Metrics |
getMetrics()
Get the component that exposes the metrics of a repository, which is for internal use only. |
Map<JcrRepository.Option,String> |
getOptions()
Get the options as configured for this repository. |
protected void |
initializeSystemContent(Graph systemGraph)
|
protected boolean |
isQueryExecutionEnabled()
|
boolean |
isSingleValueDescriptor(String key)
|
boolean |
isStandardDescriptor(String key)
|
Session |
login()
|
Session |
login(Credentials credentials)
|
Session |
login(Credentials credentials,
String workspaceName)
|
Session |
login(String workspaceName)
|
protected String |
repositoryName()
|
protected void |
updateWorkspaceNames()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final Map<JcrRepository.Option,String> DEFAULT_OPTIONS
Method Detail |
---|
protected ExecutorService backgroundService()
protected String repositoryName()
protected void updateWorkspaceNames()
protected void addWorkspace(String workspaceName, boolean isDefault)
protected void createWorkspace(String workspaceName, String clonedFromWorkspaceNamed) throws InvalidWorkspaceException, UnsupportedRepositoryOperationException
workspaceName
- the name of the workspace to be destroyed; may not be nullclonedFromWorkspaceNamed
- the name of the workspace that is to be cloned, or null if the new workspace is to be empty
InvalidWorkspaceException
- if the workspace cannot be created because one already exists
UnsupportedRepositoryOperationException
- if this repository does not support workspace managementprotected void destroyWorkspace(String workspaceName, org.modeshape.jcr.JcrWorkspace currentWorkspace) throws InvalidWorkspaceException, UnsupportedRepositoryOperationException, NoSuchWorkspaceException, RepositorySourceException
workspaceName
- the name of the workspace to be destroyed; may not be nullcurrentWorkspace
- the workspace performing the operation; may not be null
InvalidWorkspaceException
- if the workspace cannot be destroyed
UnsupportedRepositoryOperationException
- if this repository does not support workspace management
NoSuchWorkspaceException
- if the workspace does not exist
RepositorySourceException
- if there is an error destroying this workspaceprotected void initializeSystemContent(Graph systemGraph)
public Map<JcrRepository.Option,String> getOptions()
protected boolean isQueryExecutionEnabled()
public String getDescriptor(String key)
getDescriptor
in interface Repository
IllegalArgumentException
- if key
is null
.Repository.getDescriptor(java.lang.String)
public org.modeshape.jcr.JcrValue getDescriptorValue(String key)
getDescriptorValue
in interface Repository
IllegalArgumentException
- if key
is null or emptyRepository.getDescriptorValue(String)
public org.modeshape.jcr.JcrValue[] getDescriptorValues(String key)
getDescriptorValues
in interface Repository
IllegalArgumentException
- if key
is null or emptyRepository.getDescriptorValues(String)
public boolean isSingleValueDescriptor(String key)
isSingleValueDescriptor
in interface Repository
IllegalArgumentException
- if key
is null or emptyRepository.isSingleValueDescriptor(String)
public boolean isStandardDescriptor(String key)
isStandardDescriptor
in interface Repository
IllegalArgumentException
- if key
is null or emptyRepository.isStandardDescriptor(String)
public String[] getDescriptorKeys()
getDescriptorKeys
in interface Repository
Repository.getDescriptorKeys()
public Session login() throws RepositoryException
login
in interface Repository
RepositoryException
Repository.login()
public Session login(Credentials credentials) throws RepositoryException
login
in interface Repository
RepositoryException
Repository.login(javax.jcr.Credentials)
public Session login(String workspaceName) throws RepositoryException
login
in interface Repository
RepositoryException
Repository.login(java.lang.String)
public Session login(Credentials credentials, String workspaceName) throws RepositoryException
login
in interface Repository
IllegalArgumentException
- if credentials
is not null
but:
getLoginContext()
nor a getAccessControlContext()
method and is
not an instance of SimpleCredentials
.getLoginContext()
method that doesn't return a LoginContext
.
getLoginContext()
method that returns a
null
LoginContext
.
getLoginContext()
method, but provides a getAccessControlContext()
method that doesn't return an AccessControlContext
.
getLoginContext()
method, but provides a getAccessControlContext()
method that returns a null
AccessControlContext
.
RepositoryException
Repository.login(javax.jcr.Credentials, java.lang.String)
public JcrRepository.Metrics getMetrics()
protected static Properties getBundleProperties()
protected static String getBundleProperty(String propertyName, boolean required)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |