|
ModeShape Distribution 3.5.0.Final | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.modeshape.jcr.Connectors
@ThreadSafe public final class Connectors
Class which maintains (based on the configuration) the list of available connectors for a repository.
Nested Class Summary | |
---|---|
protected static class |
Connectors.AbstractPathMappings
|
protected static class |
Connectors.BasicPathMappings
|
protected static class |
Connectors.EmptyPathMappings
|
protected static class |
Connectors.LocalDocumentStoreExtraProperties
|
protected static class |
Connectors.PathMapping
|
static interface |
Connectors.PathMappings
The immutable mappings between the (federated) repository nodes and the external nodes exposed by a connector that they project. |
protected class |
Connectors.Projection
|
protected class |
Connectors.Snapshot
An immutable class used internally to provide a consistent (immutable) view of the Connector instances, along with
various cached data to make it easy to find a Connector instance by projected or external source keys, etc. |
Constructor Summary | |
---|---|
protected |
Connectors(JcrRepository.RunningState repository,
Collection<RepositoryConfiguration.Component> components,
Map<String,List<RepositoryConfiguration.ProjectionConfiguration>> preconfiguredProjections)
|
Method Summary | |
---|---|
void |
addProjection(String externalNodeKey,
String projectedNodeKey,
String alias)
Stores a mapping from an external node towards an existing, internal node which will become a federated node. |
void |
externalNodeRemoved(String externalNodeKey)
Signals that an external node with the given key has been removed. |
Connector |
getConnectorForSourceKey(String sourceKey)
Returns the connector which is mapped to the given source key. |
Connector |
getConnectorForSourceName(String sourceName)
Returns a connector which was registered for the given source name. |
DocumentTranslator |
getDocumentTranslator()
Returns the repository's document translator. |
Connectors.PathMappings |
getPathMappings(Connector connector)
Get the immutable mappings from connector-specific external paths to projected, repository paths. |
String |
getProjectedNodeKey(String externalNodeKey)
Returns the key of the internal (federated) node which has been projected on the external node with the given key. |
String |
getSourceNameAtKey(String sourceKey)
Returns the name of the external source mapped at the given key. |
protected Set<String> |
getWorkspacesWithProjectionsFor(Connector connector)
|
boolean |
hasConnectors()
Checks if there are any registered connectors. |
boolean |
hasExternalProjection(String alias,
String externalNodeKey)
Determine there is a projection with the given alias and projected (internal) node key |
protected void |
initialize()
|
protected void |
initializeConnector(Connector connector,
NamespaceRegistry registry,
NodeTypeManager nodeTypeManager)
|
protected Connector |
instantiateConnector(RepositoryConfiguration.Component component)
|
void |
internalNodeRemoved(String internalNodeKey)
Signals that an internal node with the given key has been removed. |
protected JcrRepository.RunningState |
repository()
|
protected void |
shutdown()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected Connectors(JcrRepository.RunningState repository, Collection<RepositoryConfiguration.Component> components, Map<String,List<RepositoryConfiguration.ProjectionConfiguration>> preconfiguredProjections)
Method Detail |
---|
protected void initialize() throws RepositoryException
RepositoryException
public String getProjectedNodeKey(String externalNodeKey)
externalNodeKey
- a non-null
String representing the NodeKey
format an external node
non-null
String representing the node key of the projected node, or null
if there is no
projection.public void addProjection(String externalNodeKey, String projectedNodeKey, String alias)
FederationManager.createProjection(String, String, String, String)
and need to be
stored so that parent back references (from the projection to the external node) are correctly handled.
externalNodeKey
- a non-null
String representing the NodeKey
format of the projection's id.projectedNodeKey
- a non-null
String, representing the value of the external node's keyalias
- a non-null
String, representing the alias of the projection.public void externalNodeRemoved(String externalNodeKey)
externalNodeKey
- a non-null
Stringpublic void internalNodeRemoved(String internalNodeKey)
internalNodeKey
- a non-null
Stringprotected Connector instantiateConnector(RepositoryConfiguration.Component component)
protected void initializeConnector(Connector connector, NamespaceRegistry registry, NodeTypeManager nodeTypeManager) throws IOException, RepositoryException
IOException
RepositoryException
protected JcrRepository.RunningState repository()
protected final Set<String> getWorkspacesWithProjectionsFor(Connector connector)
protected void shutdown()
public Connector getConnectorForSourceKey(String sourceKey)
sourceKey
- a non-null
String
Connector
instance of null
public String getSourceNameAtKey(String sourceKey)
sourceKey
- the key of the source; may not be null
public boolean hasExternalProjection(String alias, String externalNodeKey)
alias
- the aliasexternalNodeKey
- the node key of the projected (internal) node
public Connector getConnectorForSourceName(String sourceName)
sourceName
- a non-null
String; the name of a source
Connector
instance or null
public boolean hasConnectors()
true
if any connectors are registered, false
otherwise.public DocumentTranslator getDocumentTranslator()
DocumentTranslator
instance.public Connectors.PathMappings getPathMappings(Connector connector)
connector
- the connector for which the path mappings are requested; may not be null
|
ModeShape Distribution 3.5.0.Final | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |