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 2006-2008 Sun Microsystems, Inc. 026 */ 027 package org.opends.server.types.operation; 028 029 030 031 import java.util.List; 032 033 import org.opends.server.types.ByteString; 034 import org.opends.server.types.RawAttribute; 035 036 037 038 /** 039 * This class defines a set of methods that are available for use by 040 * pre-parse plugins for add operations. Note that this interface is 041 * 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) 049 public interface PreParseAddOperation 050 extends PreParseOperation 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 public ByteString getRawEntryDN(); 061 062 063 064 /** 065 * Specifies the raw entry DN for the entry to add. 066 * 067 * @param rawEntryDN The raw entry DN for the entry to add. 068 */ 069 public void setRawEntryDN(ByteString rawEntryDN); 070 071 072 073 /** 074 * Retrieves the set of attributes in their raw, unparsed form as 075 * read from the client request. Some of these attributes may be 076 * invalid as no validation will have been performed on them. The 077 * returned list must not be altered by the caller. 078 * 079 * @return The set of attributes in their raw, unparsed form as 080 * read from the client request. 081 */ 082 public List<RawAttribute> getRawAttributes(); 083 084 085 086 /** 087 * Adds the provided attribute to the set of raw attributes for this 088 * add operation. 089 * 090 * @param rawAttribute The attribute to add to the set of raw 091 * attributes for this add operation. 092 */ 093 public void addRawAttribute(RawAttribute rawAttribute); 094 095 096 097 /** 098 * Replaces the set of raw attributes for this add operation. 099 * 100 * @param rawAttributes The set of raw attributes for this add 101 * operation. 102 */ 103 public void setRawAttributes(List<RawAttribute> rawAttributes); 104 } 105