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