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