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-2015 ForgeRock AS.
016 */
017package org.opends.server.types.operation;
018
019
020
021import java.util.List;
022
023import org.forgerock.opendj.ldap.ByteString;
024import org.opends.server.types.RawAttribute;
025
026
027/**
028 * This class defines a set of methods that are available for use by
029 * pre-parse plugins for add operations.  Note that this interface is
030 * intended only to define an API for use by plugins and is not
031 * intended to be implemented by any custom classes.
032 */
033@org.opends.server.types.PublicAPI(
034     stability=org.opends.server.types.StabilityLevel.UNCOMMITTED,
035     mayInstantiate=false,
036     mayExtend=false,
037     mayInvoke=true)
038public interface PreParseAddOperation
039       extends PreParseOperation
040{
041  /**
042   * Retrieves the DN of the entry to add in a raw, unparsed form as
043   * it was included in the request.  This may or may not actually
044   * contain a valid DN, since no validation will have been performed
045   * on it.
046   *
047   * @return  The DN of the entry in a raw, unparsed form.
048   */
049  ByteString getRawEntryDN();
050
051
052
053  /**
054   * Specifies the raw entry DN for the entry to add.
055   *
056   * @param  rawEntryDN  The raw entry DN for the entry to add.
057   */
058  void setRawEntryDN(ByteString rawEntryDN);
059
060
061
062  /**
063   * Retrieves the set of attributes in their raw, unparsed form as
064   * read from the client request.  Some of these attributes may be
065   * invalid as no validation will have been performed on them.  The
066   * returned list must not be altered by the caller.
067   *
068   * @return  The set of attributes in their raw, unparsed form as
069   *          read from the client request.
070   */
071  List<RawAttribute> getRawAttributes();
072
073
074
075  /**
076   * Adds the provided attribute to the set of raw attributes for this
077   * add operation.
078   *
079   * @param  rawAttribute  The attribute to add to the set of raw
080   *                       attributes for this add operation.
081   */
082  void addRawAttribute(RawAttribute rawAttribute);
083
084
085
086  /**
087   * Replaces the set of raw attributes for this add operation.
088   *
089   * @param  rawAttributes  The set of raw attributes for this add
090   *                        operation.
091   */
092  void setRawAttributes(List<RawAttribute> rawAttributes);
093}
094