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