@NotExtensible @NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public class ChangeLogEntry extends ReadOnlyEntry
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ATTR_ALTERNATIVE_DELETED_ENTRY_ATTRS_INCLUDED_ATTRIBUTES
The name of an alternative attribute that may be used to obtain information
about attributes from a deleted entry if the deletedEntryAttrs attribute
is not present.
|
static java.lang.String |
ATTR_CHANGE_NUMBER
The name of the attribute that contains the change number that identifies
the change and the order it was processed in the server.
|
static java.lang.String |
ATTR_CHANGE_TYPE
The name of the attribute that contains the type of change made to the
target entry.
|
static java.lang.String |
ATTR_CHANGES
The name of the attribute used to hold a list of changes.
|
static java.lang.String |
ATTR_DELETE_OLD_RDN
The name of the attribute used to hold the flag indicating whether the old
RDN value(s) should be removed from the target entry for a modify DN
operation.
|
static java.lang.String |
ATTR_DELETED_ENTRY_ATTRS
The name of the attribute used to hold information about attributes from a
deleted entry, if available.
|
static java.lang.String |
ATTR_NEW_RDN
The name of the attribute used to hold the new RDN for a modify DN
operation.
|
static java.lang.String |
ATTR_NEW_SUPERIOR
The name of the attribute used to hold the new superior DN for a modify DN
operation.
|
static java.lang.String |
ATTR_TARGET_DN
The name of the attribute that contains the DN of the entry targeted by
the change.
|
| Constructor and Description |
|---|
ChangeLogEntry(Entry entry)
Creates a new changelog entry from the provided entry.
|
| Modifier and Type | Method and Description |
|---|---|
static ChangeLogEntry |
constructChangeLogEntry(long changeNumber,
LDIFChangeRecord changeRecord)
Constructs a changelog entry from information contained in the provided
LDIF change record.
|
boolean |
deleteOldRDN()
Indicates whether the old RDN value(s) should be removed from the entry
targeted by this modify DN changelog entry.
|
java.util.List<Attribute> |
getAddAttributes()
Retrieves the attribute list for an add changelog entry.
|
long |
getChangeNumber()
Retrieves the change number for this changelog entry.
|
ChangeType |
getChangeType()
Retrieves the change type for this changelog entry.
|
java.util.List<Attribute> |
getDeletedEntryAttributes()
Retrieves the list of deleted entry attributes for a delete changelog
entry.
|
java.util.List<Modification> |
getModifications()
Retrieves the list of modifications for a modify changelog entry.
|
java.lang.String |
getNewDN()
Retrieves the DN of the entry after the change has been processed.
|
java.lang.String |
getNewRDN()
Retrieves the new RDN for a modify DN changelog entry.
|
java.lang.String |
getNewSuperior()
Retrieves the new superior DN for a modify DN changelog entry.
|
java.lang.String |
getTargetDN()
Retrieves the target DN for this changelog entry.
|
protected static java.util.List<Attribute> |
parseAddAttributeList(Entry entry,
java.lang.String attrName,
java.lang.String targetDN)
Parses the attribute list from the specified attribute in a changelog
entry.
|
LDAPResult |
processChange(LDAPInterface connection)
Processes the operation represented by this changelog entry using the
provided LDAP connection.
|
LDIFChangeRecord |
toLDIFChangeRecord()
Retrieves an LDIF change record that is analogous to the operation
represented by this changelog entry.
|
addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, removeAttribute, removeAttributeValue, removeAttributeValue, removeAttributeValues, removeAttributeValues, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setDN, setDNaddAttribute, applyModifications, applyModifications, applyModifyDN, applyModifyDN, diff, diff, diff, duplicate, equals, getAttribute, getAttribute, getAttributes, getAttributesWithOptions, getAttributeValue, getAttributeValueAsBoolean, getAttributeValueAsDate, getAttributeValueAsDN, getAttributeValueAsInteger, getAttributeValueAsLong, getAttributeValueByteArrays, getAttributeValueBytes, getAttributeValues, getDN, getObjectClassAttribute, getObjectClassValues, getParentDN, getParentDNString, getParsedDN, getRDN, getSchema, hasAttribute, hasAttribute, hasAttribute, hasAttributeValue, hasAttributeValue, hasAttributeValue, hasAttributeValue, hashCode, hasObjectClass, intersectEntries, matchesBaseAndScope, matchesBaseAndScope, mergeEntries, removeAttributeValue, removeAttributeValue, setAttribute, toLDIF, toLDIF, toLDIF, toLDIF, toLDIFString, toLDIFString, toLDIFString, toLDIFString, toString, toString@NotNull public static final java.lang.String ATTR_CHANGE_NUMBER
@NotNull public static final java.lang.String ATTR_TARGET_DN
@NotNull public static final java.lang.String ATTR_CHANGE_TYPE
@NotNull public static final java.lang.String ATTR_CHANGES
@NotNull public static final java.lang.String ATTR_NEW_RDN
@NotNull public static final java.lang.String ATTR_DELETE_OLD_RDN
@NotNull public static final java.lang.String ATTR_NEW_SUPERIOR
@NotNull public static final java.lang.String ATTR_DELETED_ENTRY_ATTRS
@NotNull public static final java.lang.String ATTR_ALTERNATIVE_DELETED_ENTRY_ATTRS_INCLUDED_ATTRIBUTES
public ChangeLogEntry(@NotNull Entry entry) throws LDAPException
entry - The entry from which to create this changelog entry.LDAPException - If the provided entry cannot be parsed as a
changelog entry.@NotNull public static ChangeLogEntry constructChangeLogEntry(long changeNumber, @NotNull LDIFChangeRecord changeRecord) throws LDAPException
changeNumber - The change number to use for the constructed
changelog entry.changeRecord - The LDIF change record with the information to
include in the generated changelog entry.LDAPException - If a problem is encountered while constructing the
changelog entry.@NotNull protected static java.util.List<Attribute> parseAddAttributeList(@NotNull Entry entry, @NotNull java.lang.String attrName, @NotNull java.lang.String targetDN) throws LDAPException
entry - The entry containing the data to parse.attrName - The name of the attribute from which to parse the
attribute list.targetDN - The DN of the target entry.LDAPException - If an error occurs while parsing the attribute
list.public final long getChangeNumber()
@NotNull public final java.lang.String getTargetDN()
@NotNull public final ChangeType getChangeType()
@Nullable public final java.util.List<Attribute> getAddAttributes()
null if
this changelog entry does not represent an add operation.@Nullable public final java.util.List<Attribute> getDeletedEntryAttributes()
null if this changelog entry does not represent a delete
operation or no deleted entry attributes were included in the
changelog entry.@Nullable public final java.util.List<Modification> getModifications()
null if this changelog entry does
not represent a modify operation or a modify DN operation with
additional changes.@Nullable public final java.lang.String getNewRDN()
null if
this changelog entry does not represent a modify DN operation.public final boolean deleteOldRDN()
true if the old RDN value(s) should be removed from the
entry, or false if not or if this changelog entry does not
represent a modify DN operation.@Nullable public final java.lang.String getNewSuperior()
null if there is no new superior DN, or if this changelog
entry does not represent a modify DN operation.@Nullable public final java.lang.String getNewDN()
null because the entry will no longer exist.null if the entry no longer exists.@NotNull public final LDIFChangeRecord toLDIFChangeRecord()
@NotNull public final LDAPResult processChange(@NotNull LDAPInterface connection) throws LDAPException
connection - The connection (or connection pool) to use to process
the operation.LDAPException - If the operation could not be processed
successfully.