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 010 * trunk/opends/resource/legal-notices/OpenDS.LICENSE 011 * or https://OpenDS.dev.java.net/OpenDS.LICENSE. 012 * See the License for the specific language governing permissions 013 * and limitations under the License. 014 * 015 * When distributing Covered Code, include this CDDL HEADER in each 016 * file and include the License file at 017 * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable, 018 * add the following below this CDDL HEADER, with the fields enclosed 019 * by brackets "[]" replaced with your own identifying information: 020 * Portions Copyright [yyyy] [name of copyright owner] 021 * 022 * CDDL HEADER END 023 * 024 * 025 * Copyright 2008 Sun Microsystems, Inc. 026 */ 027 package org.opends.server.types.operation; 028 029 030 031 import java.util.List; 032 import java.util.Map; 033 034 import org.opends.server.types.Attribute; 035 import org.opends.server.types.AttributeType; 036 import org.opends.server.types.ByteString; 037 import org.opends.server.types.DN; 038 import org.opends.server.types.Entry; 039 import org.opends.server.types.ObjectClass; 040 import 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-synchronization 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) 055 public interface PostSynchronizationAddOperation 056 extends PostSynchronizationOperation 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 public 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 public 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 public 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 095 * caller. 096 * 097 * @return The set of processed objectclasses for the entry to add. 098 */ 099 public Map<ObjectClass,String> getObjectClasses(); 100 101 102 103 /** 104 * Retrieves the set of processed user attributes for the entry to 105 * add. The contents of the returned map must not be altered by the 106 * caller. 107 * 108 * @return The set of processed user attributes for the entry to 109 * add. 110 */ 111 public Map<AttributeType,List<Attribute>> getUserAttributes(); 112 113 114 115 /** 116 * Retrieves the set of processed operational attributes for the 117 * entry to add. The contents of the returned map must not be 118 * altered by the caller. 119 * 120 * @return The set of processed operational attributes for the 121 * entry to add. 122 */ 123 public Map<AttributeType,List<Attribute>> 124 getOperationalAttributes(); 125 126 127 128 /** 129 * Retrieves the entry to be added to the server. The contents of 130 * the returned entry must not be altered by the caller. 131 * 132 * @return The entry to be added to the server. 133 */ 134 public Entry getEntryToAdd(); 135 } 136