com.unboundid.ldap.sdk.unboundidds
Class SoftDeletedEntry

java.lang.Object
  extended by com.unboundid.ldap.sdk.Entry
      extended by com.unboundid.ldap.sdk.ReadOnlyEntry
          extended by com.unboundid.ldap.sdk.unboundidds.SoftDeletedEntry
All Implemented Interfaces:
LDIFRecord, java.io.Serializable

@NotMutable
@ThreadSafety(level=COMPLETELY_THREADSAFE)
public final class SoftDeletedEntry
extends ReadOnlyEntry

NOTE: This class is part of the Commercial Edition of the UnboundID LDAP SDK for Java. It is not available for use in applications that include only the Standard Edition of the LDAP SDK, and is not supported for use in conjunction with non-UnboundID products.
This class provides a data structure for representing information about a soft-deleted entry, which results from a soft delete operation that has caused the entry to be hidden so that it is not accessible to clients under normal circumstances, rather than causing the entry to be completely removed from the server. A soft-deleted entry will have its RDN altered to include the entryUUID for the original entry, will be updated to include the "ds-soft-delete-entry" auxiliary object class, and will have additional metadata attributes added to it which may include:

Soft-deleted entries may only be retrieved by users who have the soft-delete-read privilege, and then only by clients who issue a search request with one or more of the following characteristics:

See Also:
Serialized Form

Field Summary
static java.lang.String ATTR_SOFT_DELETE_FROM_DN
          The name of the attribute that will be included in a soft-deleted entry to indicate the original DN the entry held before it was converted to a soft-deleted entry.
static java.lang.String ATTR_SOFT_DELETE_REQUESTER_DN
          The name of the attribute that will be included in a soft-deleted entry to indicate the DN of the user that requested the soft delete operation.
static java.lang.String ATTR_SOFT_DELETE_REQUESTER_IP_ADDRESS
          The name of the attribute that will be included in a soft-deleted entry to indicate the IP address of the client that requested the soft delete operation.
static java.lang.String ATTR_SOFT_DELETE_TIMESTAMP
          The name of the attribute that will be included in a soft-deleted entry to indicate the time it was converted to a soft-deleted entry.
static java.lang.String OC_SOFT_DELETED_ENTRY
          The name of the auxiliary object class that will be used to mark soft-deleted entries.
 
Constructor Summary
SoftDeletedEntry(Entry entry)
          Creates a soft-deleted entry from the provided entry.
 
Method Summary
 java.lang.String getSoftDeleteFromDN()
          Retrieves the DN held by the entry at the time it was converted to a soft-deleted entry.
 java.lang.String getSoftDeleteRequesterDN()
          Retrieves the DN of the user that requested the soft delete operation, if available.
 java.lang.String getSoftDeleteRequesterIPAddress()
          Retrieves the IP address of the client that requested the soft delete operation, if available.
 java.util.Date getSoftDeleteTimestamp()
          Retrieves the time that the entry was converted to a soft-deleted entry, if available.
 ReadOnlyEntry getUndeletedEntry()
          Retrieves a copy of the original entry as it appeared before the soft delete operation was processed.
static boolean isSoftDeletedEntry(Entry entry)
          Indicates whether the provided entry may be parsed as a valid soft-deleted entry.
 
Methods inherited from class com.unboundid.ldap.sdk.ReadOnlyEntry
addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, removeAttribute, removeAttributeValue, removeAttributeValue, removeAttributeValues, removeAttributeValues, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setDN, setDN
 
Methods inherited from class com.unboundid.ldap.sdk.Entry
addAttribute, applyModifications, applyModifications, 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
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ATTR_SOFT_DELETE_FROM_DN

public static final java.lang.String ATTR_SOFT_DELETE_FROM_DN
The name of the attribute that will be included in a soft-deleted entry to indicate the original DN the entry held before it was converted to a soft-deleted entry.

See Also:
Constant Field Values

ATTR_SOFT_DELETE_REQUESTER_DN

public static final java.lang.String ATTR_SOFT_DELETE_REQUESTER_DN
The name of the attribute that will be included in a soft-deleted entry to indicate the DN of the user that requested the soft delete operation.

See Also:
Constant Field Values

ATTR_SOFT_DELETE_REQUESTER_IP_ADDRESS

public static final java.lang.String ATTR_SOFT_DELETE_REQUESTER_IP_ADDRESS
The name of the attribute that will be included in a soft-deleted entry to indicate the IP address of the client that requested the soft delete operation.

See Also:
Constant Field Values

ATTR_SOFT_DELETE_TIMESTAMP

public static final java.lang.String ATTR_SOFT_DELETE_TIMESTAMP
The name of the attribute that will be included in a soft-deleted entry to indicate the time it was converted to a soft-deleted entry.

See Also:
Constant Field Values

OC_SOFT_DELETED_ENTRY

public static final java.lang.String OC_SOFT_DELETED_ENTRY
The name of the auxiliary object class that will be used to mark soft-deleted entries.

See Also:
Constant Field Values
Constructor Detail

SoftDeletedEntry

public SoftDeletedEntry(Entry entry)
                 throws LDAPException
Creates a soft-deleted entry from the provided entry.

Parameters:
entry - The entry to be processed as a soft-deleted entry. It must not be null.
Throws:
LDAPException - If the provided entry does not represent a valid soft-deleted entry.
Method Detail

getSoftDeleteFromDN

public java.lang.String getSoftDeleteFromDN()
Retrieves the DN held by the entry at the time it was converted to a soft-deleted entry.

Returns:
The DN held by the entry at the time it was converted to a soft-deleted entry.

getSoftDeleteTimestamp

public java.util.Date getSoftDeleteTimestamp()
Retrieves the time that the entry was converted to a soft-deleted entry, if available.

Returns:
The time that the entry was converted to a soft-deleted entry, or null if this is not available in the entry.

getSoftDeleteRequesterDN

public java.lang.String getSoftDeleteRequesterDN()
Retrieves the DN of the user that requested the soft delete operation, if available.

Returns:
The DN of the user that requested the soft delete operation, or null if this is not available in the entry.

getSoftDeleteRequesterIPAddress

public java.lang.String getSoftDeleteRequesterIPAddress()
Retrieves the IP address of the client that requested the soft delete operation, if available.

Returns:
The IP address of the client that requested the soft delete operation, or null if this is not available in the entry.

getUndeletedEntry

public ReadOnlyEntry getUndeletedEntry()
Retrieves a copy of the original entry as it appeared before the soft delete operation was processed. It will have its original DN and all soft delete metadata attributes and auxiliary object class removed.

Returns:
A copy of the original entry as it appeared before the soft delete operation was processed.

isSoftDeletedEntry

public static boolean isSoftDeletedEntry(Entry entry)
Indicates whether the provided entry may be parsed as a valid soft-deleted entry.

Parameters:
entry - The entry to be examined. It must not be null.
Returns:
true if the provided entry contains at least a ds-soft-delete-entry object class and a ds-soft-delete-from-dn attribute.