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-2009 Sun Microsystems, Inc. 015 * Portions Copyright 2014-2016 ForgeRock AS. 016 */ 017package org.opends.server.core; 018 019import org.forgerock.opendj.ldap.AttributeDescription; 020import org.forgerock.opendj.ldap.ByteString; 021import org.forgerock.opendj.ldap.DN; 022import org.opends.server.types.Operation; 023 024/** 025 * This interface defines an operation that may be used to determine whether a 026 * specified entry in the Directory Server contains a given attribute-value 027 * pair. 028 */ 029public interface CompareOperation extends Operation 030{ 031 /** 032 * Retrieves the raw, unprocessed entry DN as included in the client request. 033 * The DN that is returned may or may not be a valid DN, since no validation 034 * will have been performed upon it. 035 * 036 * @return The raw, unprocessed entry DN as included in the client request. 037 */ 038 ByteString getRawEntryDN(); 039 040 041 /** 042 * Specifies the raw, unprocessed entry DN as included in the client request. 043 * This should only be called by pre-parse plugins. 044 * 045 * @param rawEntryDN The raw, unprocessed entry DN as included in the client 046 * request. 047 */ 048 void setRawEntryDN(ByteString rawEntryDN); 049 050 051 /** 052 * Retrieves the DN of the entry to compare. This should not be called by 053 * pre-parse plugins because the processed DN will not be available yet. 054 * Instead, they should call the <CODE>getRawEntryDN</CODE> method. 055 * 056 * @return The DN of the entry to compare, or <CODE>null</CODE> if the raw 057 * entry DN has not yet been processed. 058 */ 059 DN getEntryDN(); 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 * Specifies the raw attribute type for this compare operation. This should 072 * only be called by pre-parse plugins. 073 * 074 * @param rawAttributeType The raw attribute type for this compare 075 * operation. 076 */ 077 void setRawAttributeType(String rawAttributeType); 078 079 /** 080 * Retrieves the attribute description for this compare operation. This should not be called by 081 * pre-parse plugins because the processed attribute description will not be available yet. 082 * 083 * @return The attribute description for this compare operation. 084 */ 085 AttributeDescription getAttributeDescription(); 086 087 /** 088 * Retrieves the assertion value for this compare operation. 089 * 090 * @return The assertion value for this compare operation. 091 */ 092 ByteString getAssertionValue(); 093 094 095 /** 096 * Specifies the assertion value for this compare operation. This should only 097 * be called by pre-parse and pre-operation plugins. 098 * 099 * @param assertionValue The assertion value for this compare operation. 100 */ 101 void setAssertionValue(ByteString assertionValue); 102 103 104 /** 105 * Retrieves the proxied authorization target DN for this compare operation. 106 * 107 * @return The proxied authorization target DN for this compare operation 108 */ 109 @Override 110 DN getProxiedAuthorizationDN(); 111 112 113 /** 114 * Specifies the proxied authorization target DN for this compare operation. 115 * 116 * @param proxiedAuthorizationDN The proxied authorization target DN for 117 * this compare operation 118 */ 119 @Override 120 void setProxiedAuthorizationDN(DN proxiedAuthorizationDN); 121 122}