|
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.Snapshot
@Immutable 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.
Instances are publicly immutable.
Constructor Summary | |
---|---|
protected |
Connectors.Snapshot(Collection<RepositoryConfiguration.Component> components,
Map<String,List<RepositoryConfiguration.ProjectionConfiguration>> preconfiguredProjections)
|
protected |
Connectors.Snapshot(Connectors.Snapshot original)
|
Method Summary | |
---|---|
boolean |
containsProjectionForExternalNode(String externalNodeKey)
Determine if this snapshot contains a projection that uses the supplied external node key. |
boolean |
containsProjectionForInternalNode(String internalNodeKey)
Determine if this snapshot contains a projection that uses the supplied internal node key. |
Collection<Connector> |
getConnectors()
Get the Connector instances. |
Connector |
getConnectorWithSourceKey(String sourceKey)
Get the Connector instance that has the same source key (generated from the connector's
source name ). |
Connectors.PathMappings |
getPathMappings(Connector connector)
Get the immutable mappings from connector-specific external paths to projected, repository paths. |
List<RepositoryConfiguration.ProjectionConfiguration> |
getProjectionConfigurationsForWorkspace(String workspaceName)
Get all of the RepositoryConfiguration.ProjectionConfiguration s that apply to the workspace with the given name. |
Connectors.Projection |
getProjectionForExternalNode(String externalNodeKey)
Get the projection that uses the supplied external node key. |
Collection<Connectors.Projection> |
getProjections()
Get the Connectors.Projection instances in this snapshot. |
String |
getSourceNameAtKey(String sourceKey)
Returns the name of the external source mapped at the given key. |
Collection<String> |
getWorkspacesWithProjections()
Get the names of the workspaces that contain at least one projection. |
Set<String> |
getWorkspacesWithProjectionsFor(Connector connector)
Get the set of workspace names that contain projections of the supplied connector. |
boolean |
hasConnectors()
Determine if this snapshot contains any Connector instances. |
boolean |
hasExternalProjection(String alias,
String externalNodeKey)
Determine if this snapshot contains a projection with the given alias and external node key |
boolean |
hasInternalProjection(String alias,
String projectedNodeKey)
Determine if this snapshot contains a projection with the given alias and projected (internal) node key |
protected void |
shutdownUnusedConnectors()
|
protected Connectors.Snapshot |
withOnlyProjectionConfigurations()
Create a new snapshot that contains only the same projection configurations that this
snapshot contains. |
protected Connectors.Snapshot |
withoutConnectors(Iterable<Connector> connectors)
Create a new snapshot that is a copy of this snapshot but which excludes any of the supplied connector instances. |
protected Connectors.Snapshot |
withoutProjection(String externalNodeKey)
Create a new snapshot that excludes any existing projection that uses the supplied external node key. |
protected Connectors.Snapshot |
withProjection(Connectors.Projection projection)
Create a new snapshot that is a copy of this snapshot but which includes the supplied projection. |
protected Connectors.Snapshot |
withProjections(Iterable<Connectors.Projection> projections)
Create a new snapshot that is a copy of this snapshot but which includes the supplied projections. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected Connectors.Snapshot(Collection<RepositoryConfiguration.Component> components, Map<String,List<RepositoryConfiguration.ProjectionConfiguration>> preconfiguredProjections)
protected Connectors.Snapshot(Connectors.Snapshot original)
Method Detail |
---|
protected void shutdownUnusedConnectors()
public boolean hasConnectors()
Connector
instances.
public Connector getConnectorWithSourceKey(String sourceKey)
Connector
instance that has the same source key (generated from the connector's
source name
).
sourceKey
- the source key
public String getSourceNameAtKey(String sourceKey)
sourceKey
- the key of the source; may not be null
public Collection<Connector> getConnectors()
Connector
instances.
public Collection<String> getWorkspacesWithProjections()
getProjectionConfigurationsForWorkspace(String)
public List<RepositoryConfiguration.ProjectionConfiguration> getProjectionConfigurationsForWorkspace(String workspaceName)
RepositoryConfiguration.ProjectionConfiguration
s that apply to the workspace with the given name.
workspaceName
- the name of the workspace
getWorkspacesWithProjections()
public Set<String> getWorkspacesWithProjectionsFor(Connector connector)
connector
- the connector
public boolean hasInternalProjection(String alias, String projectedNodeKey)
alias
- the aliasprojectedNodeKey
- the node key of the projected (internal) node
public boolean hasExternalProjection(String alias, String externalNodeKey)
alias
- the aliasexternalNodeKey
- the node key of the external node
public Collection<Connectors.Projection> getProjections()
Connectors.Projection
instances in this snapshot.
public Connectors.Projection getProjectionForExternalNode(String externalNodeKey)
externalNodeKey
- the node key for the external node
public boolean containsProjectionForExternalNode(String externalNodeKey)
externalNodeKey
- the node key for the external node
public boolean containsProjectionForInternalNode(String internalNodeKey)
internalNodeKey
- the node key for the internal node
protected Connectors.Snapshot withoutProjection(String externalNodeKey)
externalNodeKey
- the node key for the external node
protected Connectors.Snapshot withoutConnectors(Iterable<Connector> connectors)
connectors
- the connectors
should be called after this Snapshot is no longer accessible, so that any previous
Connector instance is {@link Connector#shutdown()}
protected Connectors.Snapshot withProjection(Connectors.Projection projection)
projection
- the projection
protected Connectors.Snapshot withProjections(Iterable<Connectors.Projection> projections)
projections
- the projections
protected Connectors.Snapshot withOnlyProjectionConfigurations()
projection configurations
that this
snapshot contains.
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 |