Class DefaultTempEntryRenamingStrategy
java.lang.Object
org.springframework.ldap.transaction.compensating.support.DefaultTempEntryRenamingStrategy
- All Implemented Interfaces:
TempEntryRenamingStrategy
Default implementation of
TempEntryRenamingStrategy
. This implementation simply
adds "_temp" to the leftmost (least significant part) of the name. For example:
cn=john doe, ou=company1, c=SEbecomes:
cn=john doe_temp, ou=company1, c=SE
Note that using this strategy means that the entry remains in virtually the same location as where it originally resided. This means that searches later in the same transaction might return references to the temporary entry even though it should have been removed or rebound.
- Since:
- 1.2
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetTemporaryName
(Name originalName) Get a temporary name for the current entry to be renamed to.Get the suffix that will be used for renaming temporary entries.void
setTempSuffix
(String tempSuffix) Set the suffix to use for renaming temporary entries.
-
Field Details
-
DEFAULT_TEMP_SUFFIX
The default temp entry suffix, "_temp".- See Also:
-
-
Constructor Details
-
DefaultTempEntryRenamingStrategy
public DefaultTempEntryRenamingStrategy()
-
-
Method Details
-
getTemporaryName
Description copied from interface:TempEntryRenamingStrategy
Get a temporary name for the current entry to be renamed to.- Specified by:
getTemporaryName
in interfaceTempEntryRenamingStrategy
- Parameters:
originalName
- The original name of the entry.- Returns:
- The name to which the entry should be temporarily renamed according to this strategy.
-
getTempSuffix
Get the suffix that will be used for renaming temporary entries.- Returns:
- the suffix.
-
setTempSuffix
Set the suffix to use for renaming temporary entries. Default value isDEFAULT_TEMP_SUFFIX
.- Parameters:
tempSuffix
- the suffix.
-