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