org.jboss.dna.connector.federation.merge.strategy
Class OneContributionMergeStrategy
java.lang.Object
org.jboss.dna.connector.federation.merge.strategy.OneContributionMergeStrategy
- All Implemented Interfaces:
- MergeStrategy
@ThreadSafe
public class OneContributionMergeStrategy
- extends Object
- implements MergeStrategy
A merge strategy that is optimized for merging when there is a single contribution.
- Author:
- Randall Hauch
|
Method Summary |
void |
merge(FederatedNode federatedNode,
List<Contribution> contributions,
org.jboss.dna.graph.ExecutionContext context)
Merge the contributions into a single
This method only uses the one and only one non-null Contribution in the contributions. |
protected org.jboss.dna.graph.Location |
translateChildFromSourceToRepository(org.jboss.dna.graph.properties.PathFactory factory,
org.jboss.dna.graph.Location parent,
org.jboss.dna.graph.Location childInSource)
Utility method to translate the list of locations of the children so that the locations all are correctly relative to
parent location of the federated node. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OneContributionMergeStrategy
public OneContributionMergeStrategy()
merge
public void merge(FederatedNode federatedNode,
List<Contribution> contributions,
org.jboss.dna.graph.ExecutionContext context)
- Merge the contributions into a single
This method only uses the one and only one non-null Contribution in the contributions.
- Specified by:
merge in interface MergeStrategy
- Parameters:
federatedNode - the federated node into which the contributions are to be merged; never nullcontributions - the contributions to the node; never null, never empty, and never containing nullscontext - the context in which this operation is to be performed; never null- See Also:
MergeStrategy.merge(org.jboss.dna.connector.federation.merge.FederatedNode,
java.util.List, org.jboss.dna.graph.ExecutionContext)
translateChildFromSourceToRepository
protected org.jboss.dna.graph.Location translateChildFromSourceToRepository(org.jboss.dna.graph.properties.PathFactory factory,
org.jboss.dna.graph.Location parent,
org.jboss.dna.graph.Location childInSource)
- Utility method to translate the list of locations of the children so that the locations all are correctly relative to
parent location of the federated node.
- Parameters:
factory - the path factoryparent - the parent of the childchildInSource - the child to be translated, with a source-specific location
- Returns:
- the list of locations of each child
Copyright © 2008-Present JBoss a division of Red Hat. All Rights Reserved.