public class DefaultTempEntryRenamingStrategy extends Object implements TempEntryRenamingStrategy
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.
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_TEMP_SUFFIX
The default temp entry suffix, "_temp".
|
Constructor and Description |
---|
DefaultTempEntryRenamingStrategy() |
Modifier and Type | Method and Description |
---|---|
Name |
getTemporaryName(Name originalName)
Get a temporary name for the current entry to be renamed to.
|
String |
getTempSuffix()
Get the suffix that will be used for renaming temporary entries.
|
void |
setTempSuffix(String tempSuffix)
Set the suffix to use for renaming temporary entries.
|
public static final String DEFAULT_TEMP_SUFFIX
public Name getTemporaryName(Name originalName)
TempEntryRenamingStrategy
getTemporaryName
in interface TempEntryRenamingStrategy
originalName
- The original name of the entry.public String getTempSuffix()
public void setTempSuffix(String tempSuffix)
DEFAULT_TEMP_SUFFIX
.tempSuffix
- the suffix.