|
ModeShape Distribution 3.1.0.Final | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.modeshape.jcr.Connectors
public class Connectors
Class which maintains (based on the configuration) the list of available connectors for a repository.
| Nested Class Summary | |
|---|---|
protected static class |
Connectors.LocalDocumentStoreExtraProperties
|
protected class |
Connectors.Projection
|
| Constructor Summary | |
|---|---|
protected |
Connectors(JcrRepository.RunningState repository,
Collection<RepositoryConfiguration.Component> components,
Map<String,List<RepositoryConfiguration.Federation.ProjectionConfiguration>> preconfiguredProjections)
|
| Method Summary | |
|---|---|
void |
addConnector(RepositoryConfiguration.Component component)
Add a new connector by supplying the component definition. |
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. |
String |
getProjectedNodeKey(String externalNodeKey)
Returns the key of the internal (federated) node which has been projected on the external node with the given key. |
boolean |
hasConnectors()
Checks if there are any registered connectors. |
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 void |
registerConnector(Connector connector)
|
boolean |
removeConnector(String connectorName)
Remove an existing connector registered with the supplied name. |
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.Federation.ProjectionConfiguration>> preconfiguredProjections)
| Method Detail |
|---|
protected void initialize()
throws RepositoryException
RepositoryException
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 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 externalNodeRemoved(String externalNodeKey)
externalNodeKey - a non-null Stringpublic void internalNodeRemoved(String internalNodeKey)
internalNodeKey - a non-null String
public void addConnector(RepositoryConfiguration.Component component)
throws RepositoryException
component - the component describing the connector; may not be null
RepositoryException - if there is a problem initializing the connectorpublic boolean removeConnector(String connectorName)
connectorName - the name of the connector that should be removed; may not be null
protected Connector instantiateConnector(RepositoryConfiguration.Component component)
protected void initializeConnector(Connector connector,
NamespaceRegistry registry,
NodeTypeManager nodeTypeManager)
throws IOException,
RepositoryException
IOException
RepositoryExceptionprotected void registerConnector(Connector connector)
protected void shutdown()
public Connector getConnectorForSourceKey(String sourceKey)
sourceKey - a non-null String
Connector instance of nullpublic Connector getConnectorForSourceName(String sourceName)
sourceName - a non-null String; the name of a source
Connector instance or nullpublic DocumentTranslator getDocumentTranslator()
DocumentTranslator instance.public boolean hasConnectors()
true if any connectors are registered, false otherwise.
|
ModeShape Distribution 3.1.0.Final | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||