Class SoftDeletedEntry

  • All Implemented Interfaces:
    LDIFRecord, java.io.Serializable

    @NotMutable
    @ThreadSafety(level=COMPLETELY_THREADSAFE)
    public final class SoftDeletedEntry
    extends ReadOnlyEntry
    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.
    NOTE: This class, and other classes within the com.unboundid.ldap.sdk.unboundidds package structure, are only supported for use against Ping Identity, UnboundID, and Nokia/Alcatel-Lucent 8661 server products. These classes provide support for proprietary functionality or for external specifications that are not considered stable or mature enough to be guaranteed to work in an interoperable way with other types of LDAP servers.

    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:
    • ds-soft-delete-from-dn -- This specifies the DN assigned to the entry before it was converted to a soft-deleted entry.
    • ds-soft-delete-timestamp -- This specifies the time that the entry was converted to a soft-deleted entry.
    • ds-soft-delete-requester-dn -- This specifies the DN of the user who requested the soft delete operation.
    • ds-soft-delete-requester-ip-address -- This specifies the IP address of the client that requested the soft delete operation.


    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:
    • The search operation has a scope of baseObject and a base DN which specifically targets a soft-deleted entry.
    • The search operation includes a filter with a component that will specifically match entries that have the ds-soft-delete-entry object class (e.g., "(objectClass=ds-soft-delete-entry)").
    • The search operation includes a SoftDeletedEntryAccessRequestControl.
    See Also:
    Serialized Form
    • 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
    • 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.