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