@ThreadSafe public final class Connectors extends Object
Modifier and Type | Class and Description |
---|---|
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
|
Modifier | Constructor and Description |
---|---|
protected |
Connectors(JcrRepository.RunningState repository,
Collection<RepositoryConfiguration.Component> components,
Map<String,List<RepositoryConfiguration.ProjectionConfiguration>> preconfiguredProjections) |
Modifier and Type | Method and Description |
---|---|
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 boolean |
hasReadonlyConnectors() |
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 boolean |
isReadonlyPath(Path path,
JcrSession session) |
protected JcrRepository.RunningState |
repository() |
protected void |
shutdown() |
protected Connectors(JcrRepository.RunningState repository, Collection<RepositoryConfiguration.Component> components, Map<String,List<RepositoryConfiguration.ProjectionConfiguration>> preconfiguredProjections)
protected void initialize() throws RepositoryException
RepositoryException
public String getProjectedNodeKey(String externalNodeKey)
externalNodeKey
- a non-null
String representing the NodeKey
format an external nodenon-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()
protected boolean hasReadonlyConnectors()
public Connector getConnectorForSourceKey(String sourceKey)
public String getSourceNameAtKey(String sourceKey)
sourceKey
- the key of the source; may not be nullpublic boolean hasExternalProjection(String alias, String externalNodeKey)
alias
- the aliasexternalNodeKey
- the node key of the projected (internal) nodepublic Connector getConnectorForSourceName(String sourceName)
sourceName
- a non-null
String; the name of a sourceConnector
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 nullprotected boolean isReadonlyPath(Path path, JcrSession session) throws RepositoryException
RepositoryException
Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.