001/*
002 * The contents of this file are subject to the terms of the Common Development and
003 * Distribution License (the License). You may not use this file except in compliance with the
004 * License.
005 *
006 * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
007 * specific language governing permission and limitations under the License.
008 *
009 * When distributing Covered Software, include this CDDL Header Notice in each file and include
010 * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
011 * Header, with the fields enclosed by brackets [] replaced by your own identifying
012 * information: "Portions Copyright [year] [name of copyright owner]".
013 *
014 * Copyright 2006-2008 Sun Microsystems, Inc.
015 * Portions Copyright 2014-2016 ForgeRock AS.
016 */
017package org.opends.server.types.operation;
018
019
020
021import java.util.List;
022
023import org.opends.server.types.*;
024import org.forgerock.opendj.ldap.ByteString;
025import org.forgerock.opendj.ldap.DN;
026
027
028/**
029 * This class defines a set of methods that are available for use by
030 * post-response plugins for modify operations.  Note that this
031 * interface is intended only to define an API for use by plugins and
032 * is not intended to be implemented by any custom classes.
033 */
034@org.opends.server.types.PublicAPI(
035     stability=org.opends.server.types.StabilityLevel.UNCOMMITTED,
036     mayInstantiate=false,
037     mayExtend=false,
038     mayInvoke=true)
039public interface PostResponseModifyOperation
040       extends PostResponseOperation
041{
042  /**
043   * Retrieves the raw, unprocessed entry DN as included in the client
044   * request.  The DN that is returned may or may not be a valid DN,
045   * since no validation will have been performed upon it.
046   *
047   * @return  The raw, unprocessed entry DN as included in the client
048   *          request.
049   */
050  ByteString getRawEntryDN();
051
052
053
054  /**
055   * Retrieves the DN of the entry to modify.
056   *
057   * @return  The DN of the entry to modify.
058   */
059  DN getEntryDN();
060
061
062
063  /**
064   * Retrieves the set of raw, unprocessed modifications as included
065   * in the client request.  Note that this may contain one or more
066   * invalid modifications, as no validation will have been performed
067   * on this information.  The list returned must not be altered by
068   * the caller.
069   *
070   * @return  The set of raw, unprocessed modifications as included
071   *          in the client request.
072   */
073  List<RawModification> getRawModifications();
074
075
076
077  /**
078   * Retrieves the set of modifications for this modify operation.
079   Its contents should not be altered.
080   *
081   * @return  The set of modifications for this modify operation.
082   */
083  List<Modification> getModifications();
084
085
086
087  /**
088   * Retrieves the current entry before any modifications are applied.
089   * It should not be modified by the caller.
090   *
091   * @return  The current entry before any modifications are applied.
092   */
093  Entry getCurrentEntry();
094
095
096
097  /**
098   * Retrieves the modified entry that is to be written to the
099   * backend.  It should not be modified by the caller.
100   *
101   * @return  The modified entry that is to be written to the backend.
102   */
103  Entry getModifiedEntry();
104
105
106
107  /**
108   * Retrieves the set of clear-text current passwords for the user,
109   * if available.  This will only be available if the modify
110   * operation contains one or more delete elements that target the
111   * password attribute and provide the values to delete in the clear.
112   * This list should not be altered by the caller.
113   *
114   * @return  The set of clear-text current password values as
115   *          provided in the modify request, or <CODE>null</CODE> if
116   *          there were none.
117   */
118  List<ByteString> getCurrentPasswords();
119
120
121
122  /**
123   * Retrieves the set of clear-text new passwords for the user, if
124   * available.  This will only be available if the modify operation
125   * contains one or more add or replace elements that target the
126   * password attribute and provide the values in the clear.  This
127   * list should not be altered by the caller.
128   *
129   * @return  The set of clear-text new passwords as provided in the
130   *          modify request, or <CODE>null</CODE> if there were none.
131   */
132  List<ByteString> getNewPasswords();
133}
134