001/*
002 * Copyright 2007-2019 Ping Identity Corporation
003 * All Rights Reserved.
004 */
005/*
006 * Copyright (C) 2008-2019 Ping Identity Corporation
007 *
008 * This program is free software; you can redistribute it and/or modify
009 * it under the terms of the GNU General Public License (GPLv2 only)
010 * or the terms of the GNU Lesser General Public License (LGPLv2.1 only)
011 * as published by the Free Software Foundation.
012 *
013 * This program is distributed in the hope that it will be useful,
014 * but WITHOUT ANY WARRANTY; without even the implied warranty of
015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
016 * GNU General Public License for more details.
017 *
018 * You should have received a copy of the GNU General Public License
019 * along with this program; if not, see <http://www.gnu.org/licenses>.
020 */
021package com.unboundid.ldap.sdk;
022
023
024
025import com.unboundid.ldif.LDIFDeleteChangeRecord;
026import com.unboundid.util.NotExtensible;
027import com.unboundid.util.ThreadSafety;
028import com.unboundid.util.ThreadSafetyLevel;
029
030
031
032/**
033 * This interface defines a set of methods that may be safely called in an LDAP
034 * delete request without altering its contents.  This interface must not be
035 * implemented by any class other than {@link DeleteRequest}.
036 * <BR><BR>
037 * This interface does not inherently provide the assurance of thread safety for
038 * the methods that it exposes, because it is still possible for a thread
039 * referencing the object which implements this interface to alter the request
040 * using methods not included in this interface.  However, if it can be
041 * guaranteed that no thread will alter the underlying object, then the methods
042 * exposed by this interface can be safely invoked concurrently by any number of
043 * threads.
044 */
045@NotExtensible()
046@ThreadSafety(level=ThreadSafetyLevel.INTERFACE_NOT_THREADSAFE)
047public interface ReadOnlyDeleteRequest
048       extends ReadOnlyLDAPRequest
049{
050  /**
051   * Retrieves the DN of the entry to delete.
052   *
053   * @return  The DN of the entry to delete.
054   */
055  String getDN();
056
057
058
059  /**
060   * {@inheritDoc}
061   */
062  @Override()
063  DeleteRequest duplicate();
064
065
066
067  /**
068   * {@inheritDoc}
069   */
070  @Override()
071  DeleteRequest duplicate(Control[] controls);
072
073
074
075  /**
076   * Retrieves an LDIF delete change record with the contents of this delete
077   * request.
078   *
079   * @return  An LDIF delete change record with the contents of this delete
080   *          request.
081   */
082  LDIFDeleteChangeRecord toLDIFChangeRecord();
083
084
085
086  /**
087   * Retrieves a string array whose lines contain an LDIF representation of the
088   * corresponding delete change record.
089   *
090   * @return  A string array whose lines contain an LDIF representation of the
091   *          corresponding delete change record.
092   */
093  String[] toLDIF();
094
095
096
097  /**
098   * Retrieves an LDIF string representation of this delete request.
099   *
100   * @return  An LDIF string representation of this delete request.
101   */
102  String toLDIFString();
103}