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