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
010 * trunk/opends/resource/legal-notices/OpenDS.LICENSE
011 * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
012 * See the License for the specific language governing permissions
013 * and limitations under the License.
014 *
015 * When distributing Covered Code, include this CDDL HEADER in each
016 * file and include the License file at
017 * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
018 * add the following below this CDDL HEADER, with the fields enclosed
019 * by brackets "[]" replaced with your own identifying information:
020 * Portions Copyright [yyyy] [name of copyright owner]
021 *
022 * CDDL HEADER END
023 *
024 *
025 * Copyright 2006-2008 Sun Microsystems, Inc.
026 */
027 package org.opends.server.core;
028
029 import org.opends.server.types.AttributeType;
030 import org.opends.server.types.ByteString;
031 import org.opends.server.types.DN;
032 import org.opends.server.types.Operation;
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 */
040 public 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 public 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 public 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 public 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 public 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 public 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 public 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 public void setAttributeType(AttributeType attributeType);
107
108
109 /**
110 * Retrieves the assertion value for this compare operation.
111 *
112 * @return The assertion value for this compare operation.
113 */
114 public ByteString getAssertionValue();
115
116
117 /**
118 * Specifies the assertion value for this compare operation. This should only
119 * be called by pre-parse and pre-operation plugins.
120 *
121 * @param assertionValue The assertion value for this compare operation.
122 */
123 public void setAssertionValue(ByteString assertionValue);
124
125
126 /**
127 * Retrieves the proxied authorization target DN for this compare operation.
128 *
129 * @return The proxied authorization target DN for this compare operation
130 */
131 public DN getProxiedAuthorizationDN();
132
133
134 /**
135 * Specifies the proxied authorization target DN for this compare operation.
136 *
137 * @param proxiedAuthorizationDN The proxied authorization target DN for
138 * this compare operation
139 */
140 public void setProxiedAuthorizationDN(DN proxiedAuthorizationDN);
141
142 }