Class DifferentSubtreeTempEntryRenamingStrategy
- java.lang.Object
-
- org.springframework.ldap.transaction.compensating.support.DifferentSubtreeTempEntryRenamingStrategy
-
- All Implemented Interfaces:
TempEntryRenamingStrategy
public class DifferentSubtreeTempEntryRenamingStrategy extends java.lang.Object implements TempEntryRenamingStrategy
ATempEntryRenamingStrategythat moves the entry to a different subtree than the original entry. The specified subtree needs to be present in the LDAP tree; it will not be created and operations using this strategy will fail if the destination is not in place. However, this strategy is preferable toDefaultTempEntryRenamingStrategy, as it makes searches have the expected result even though the temporary entry still exists during the transaction.Example: If the specified
subtreeNodeisou=tempEntriesand theoriginalNameiscn=john doe, ou=company1, c=SE, the result ofgetTemporaryName(Name)will becn=john doe1, ou=tempEntries. The "1" suffix is a sequence number needed to prevent potential collisions in the temporary storage.- Since:
- 1.2
-
-
Constructor Summary
Constructors Constructor Description DifferentSubtreeTempEntryRenamingStrategy(java.lang.String subtreeNode)DifferentSubtreeTempEntryRenamingStrategy(javax.naming.Name subtreeNode)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.naming.NamegetSubtreeNode()javax.naming.NamegetTemporaryName(javax.naming.Name originalName)Get a temporary name for the current entry to be renamed to.voidsetSubtreeNode(javax.naming.Name subtreeNode)
-
-
-
Method Detail
-
getSubtreeNode
public javax.naming.Name getSubtreeNode()
-
setSubtreeNode
public void setSubtreeNode(javax.naming.Name subtreeNode)
-
getTemporaryName
public javax.naming.Name getTemporaryName(javax.naming.Name originalName)
Description copied from interface:TempEntryRenamingStrategyGet a temporary name for the current entry to be renamed to.- Specified by:
getTemporaryNamein interfaceTempEntryRenamingStrategy- Parameters:
originalName- The original name of the entry.- Returns:
- The name to which the entry should be temporarily renamed according to this strategy.
-
-