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