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