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 legal-notices/CDDLv1_0.txt 010 * or http://forgerock.org/license/CDDLv1.0.html. 011 * See the License for the specific language governing permissions 012 * and limitations under the License. 013 * 014 * When distributing Covered Code, include this CDDL HEADER in each 015 * file and include the License file at legal-notices/CDDLv1_0.txt. 016 * If applicable, add the following below this CDDL HEADER, with the 017 * fields enclosed by brackets "[]" replaced with your own identifying 018 * information: 019 * Portions Copyright [yyyy] [name of copyright owner] 020 * 021 * CDDL HEADER END 022 * 023 * 024 * Copyright 2006-2009 Sun Microsystems, Inc. 025 * Portions Copyright 2014-2015 ForgeRock AS 026 */ 027package org.opends.server.core; 028 029import java.util.Set; 030 031import org.opends.server.types.*; 032import org.forgerock.opendj.ldap.ByteString; 033 034 035/** 036 * This interface defines an operation that may be used to determine whether a 037 * specified entry in the Directory Server contains a given attribute-value 038 * pair. 039 */ 040public interface CompareOperation extends Operation 041{ 042 /** 043 * Retrieves the raw, unprocessed entry DN as included in the client request. 044 * The DN that is returned may or may not be a valid DN, since no validation 045 * will have been performed upon it. 046 * 047 * @return The raw, unprocessed entry DN as included in the client request. 048 */ 049 ByteString getRawEntryDN(); 050 051 052 /** 053 * Specifies the raw, unprocessed entry DN as included in the client request. 054 * This should only be called by pre-parse plugins. 055 * 056 * @param rawEntryDN The raw, unprocessed entry DN as included in the client 057 * request. 058 */ 059 void setRawEntryDN(ByteString rawEntryDN); 060 061 062 /** 063 * Retrieves the DN of the entry to compare. This should not be called by 064 * pre-parse plugins because the processed DN will not be available yet. 065 * Instead, they should call the <CODE>getRawEntryDN</CODE> method. 066 * 067 * @return The DN of the entry to compare, or <CODE>null</CODE> if the raw 068 * entry DN has not yet been processed. 069 */ 070 DN getEntryDN(); 071 072 073 /** 074 * Retrieves the raw attribute type for this compare operation. 075 * 076 * @return The raw attribute type for this compare operation. 077 */ 078 String getRawAttributeType(); 079 080 081 /** 082 * Specifies the raw attribute type for this compare operation. This should 083 * only be called by pre-parse plugins. 084 * 085 * @param rawAttributeType The raw attribute type for this compare 086 * operation. 087 */ 088 void setRawAttributeType(String rawAttributeType); 089 090 091 /** 092 * Retrieves the attribute type for this compare operation. This should not 093 * be called by pre-parse plugins because the processed attribute type will 094 * not be available yet. 095 * 096 * @return The attribute type for this compare operation. 097 */ 098 AttributeType getAttributeType(); 099 100 101 /** 102 * Specifies the attribute type for this compare operation. 103 * 104 * @param attributeType The attribute type for this compare operation. 105 */ 106 void setAttributeType(AttributeType attributeType); 107 108 109 /** 110 * Retrieves the attribute options for this compare operation. This should 111 * not be called by the pre-parse plugins because the processed attribute 112 * options will not be available yet. 113 * 114 * @return The attribute options for this compare operation. 115 */ 116 Set<String> getAttributeOptions(); 117 118 /** 119 * Specifies the attribute options for this compare operation. 120 * 121 * @param attributeOptions The attribute options for this compare operation. 122 */ 123 void setAttributeOptions(Set<String> attributeOptions); 124 125 /** 126 * Retrieves the assertion value for this compare operation. 127 * 128 * @return The assertion value for this compare operation. 129 */ 130 ByteString getAssertionValue(); 131 132 133 /** 134 * Specifies the assertion value for this compare operation. This should only 135 * be called by pre-parse and pre-operation plugins. 136 * 137 * @param assertionValue The assertion value for this compare operation. 138 */ 139 void setAssertionValue(ByteString assertionValue); 140 141 142 /** 143 * Retrieves the proxied authorization target DN for this compare operation. 144 * 145 * @return The proxied authorization target DN for this compare operation 146 */ 147 DN getProxiedAuthorizationDN(); 148 149 150 /** 151 * Specifies the proxied authorization target DN for this compare operation. 152 * 153 * @param proxiedAuthorizationDN The proxied authorization target DN for 154 * this compare operation 155 */ 156 void setProxiedAuthorizationDN(DN proxiedAuthorizationDN); 157 158}