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 019 020 021import java.util.List; 022import java.util.Map; 023 024import org.opends.server.types.Attribute; 025import org.forgerock.opendj.ldap.schema.AttributeType; 026import org.forgerock.opendj.ldap.ByteString; 027import org.forgerock.opendj.ldap.DN; 028import org.opends.server.types.Entry; 029import org.forgerock.opendj.ldap.schema.ObjectClass; 030import org.opends.server.types.RawAttribute; 031 032 033 034/** 035 * This class defines a set of methods that are available for use by 036 * post-synchronization plugins for add operations. Note that this 037 * interface is intended only to define an API for use by plugins and 038 * is not intended to be implemented by any custom classes. 039 */ 040@org.opends.server.types.PublicAPI( 041 stability=org.opends.server.types.StabilityLevel.UNCOMMITTED, 042 mayInstantiate=false, 043 mayExtend=false, 044 mayInvoke=true) 045public interface PostSynchronizationAddOperation 046 extends PostSynchronizationOperation 047{ 048 /** 049 * Retrieves the DN of the entry to add in a raw, unparsed form as 050 * it was included in the request. This may or may not actually 051 * contain a valid DN, since no validation will have been performed 052 * on it. 053 * 054 * @return The DN of the entry in a raw, unparsed form. 055 */ 056 ByteString getRawEntryDN(); 057 058 059 060 /** 061 * Retrieves the set of attributes in their raw, unparsed form as 062 * read from the client request. Some of these attributes may be 063 * invalid as no validation will have been performed on them. The 064 * returned list must not be altered by the caller. 065 * 066 * @return The set of attributes in their raw, unparsed form as 067 * read from the client request. 068 */ 069 List<RawAttribute> getRawAttributes(); 070 071 072 073 /** 074 * Retrieves the DN of the entry to add. 075 * 076 * @return The DN of the entry to add. 077 */ 078 DN getEntryDN(); 079 080 081 082 /** 083 * Retrieves the set of processed objectclasses for the entry to 084 * add. The contents of the returned map must not be altered by the 085 * caller. 086 * 087 * @return The set of processed objectclasses for the entry to add. 088 */ 089 Map<ObjectClass,String> getObjectClasses(); 090 091 092 093 /** 094 * Retrieves the set of processed user attributes for the entry to 095 * add. The contents of the returned map must not be altered by the 096 * caller. 097 * 098 * @return The set of processed user attributes for the entry to 099 * add. 100 */ 101 Map<AttributeType,List<Attribute>> getUserAttributes(); 102 103 104 105 /** 106 * Retrieves the set of processed operational attributes for the 107 * entry to add. The contents of the returned map must not be 108 * altered by the caller. 109 * 110 * @return The set of processed operational attributes for the 111 * entry to add. 112 */ 113 Map<AttributeType,List<Attribute>> 114 getOperationalAttributes(); 115 116 117 118 /** 119 * Retrieves the entry to be added to the server. The contents of 120 * the returned entry must not be altered by the caller. 121 * 122 * @return The entry to be added to the server. 123 */ 124 Entry getEntryToAdd(); 125} 126