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 org.forgerock.opendj.ldap.AttributeDescription;
022import org.forgerock.opendj.ldap.ByteString;
023import org.forgerock.opendj.ldap.DN;
024import org.opends.server.types.Entry;
025
026
027
028/**
029 * This class defines a set of methods that are available for use by
030 * pre-operation plugins for compare operations.  Note that this
031 * interface is intended only to define an API for use by plugins and
032 * is not intended to be implemented by any custom classes.
033 */
034@org.opends.server.types.PublicAPI(
035     stability=org.opends.server.types.StabilityLevel.UNCOMMITTED,
036     mayInstantiate=false,
037     mayExtend=false,
038     mayInvoke=true)
039public interface PreOperationCompareOperation
040       extends PreOperationOperation
041{
042  /**
043   * Retrieves the raw, unprocessed entry DN as included in the client
044   * request.
045   *
046   * @return  The raw, unprocessed entry DN as included in the client
047   *          request.
048   */
049  ByteString getRawEntryDN();
050
051
052
053  /**
054   * Retrieves the DN of the entry to compare.
055   *
056   * @return  The DN of the entry to compare.
057   */
058  DN getEntryDN();
059
060
061
062  /**
063   * Retrieves the raw attribute type for this compare operation.
064   *
065   * @return  The raw attribute type for this compare operation.
066   */
067  String getRawAttributeType();
068
069
070
071  /**
072   * Retrieves the attribute description for this compare operation.
073   *
074   * @return The attribute description for this compare operation.
075   */
076  AttributeDescription getAttributeDescription();
077
078
079
080  /**
081   * Retrieves the assertion value for this compare operation.
082   *
083   * @return  The assertion value for this compare operation.
084   */
085  ByteString getAssertionValue();
086
087
088
089  /**
090   * Specifies the assertion value for this compare operation.
091   *
092   * @param  assertionValue  The assertion value for this compare
093   *                         operation.
094   */
095  void setAssertionValue(ByteString assertionValue);
096
097
098
099  /**
100   * Retrieves the entry to target with the compare operation.
101   *
102   * @return  The entry to target with the compare operation.
103   */
104  Entry getEntryToCompare();
105}
106