org.apache.directory.api.ldap.model.message
Interface CompareRequest

All Superinterfaces:
AbandonableRequest, Message, Request, ResultResponseRequest<CompareResponse>, SingleReplyRequest<CompareResponse>
All Known Implementing Classes:
CompareRequestImpl

public interface CompareRequest
extends SingleReplyRequest<CompareResponse>, AbandonableRequest

Compare request protocol message that tests an entry to see if it abides by an attribute value assertion.

Author:
Apache Directory Project

Field Summary
static MessageTypeEnum RESP_TYPE
          Compare response message type enum code
static MessageTypeEnum TYPE
          Compare request message type enum code
 
Method Summary
 CompareRequest addAllControls(Control[] controls)
          Adds an array of controls to this Message.
 CompareRequest addControl(Control control)
          Adds a control to this Message.
 Value<?> getAssertionValue()
          Gets the attribute value to use in making the comparison.
 String getAttributeId()
          Gets the attribute id use in making the comparison.
 Dn getName()
          Gets the distinguished name of the entry to be compared using the attribute value assertion.
 CompareRequest removeControl(Control control)
          Deletes a control removing it from this Message.
 CompareRequest setAssertionValue(byte[] value)
          Sets the attribute value to use in the comparison.
 CompareRequest setAssertionValue(String value)
          Sets the attribute value to use in the comparison.
 CompareRequest setAttributeId(String attrId)
          Sets the attribute id used in the comparison.
 CompareRequest setMessageId(int messageId)
          Sets the Message ID for this request
 CompareRequest setName(Dn name)
          Sets the distinguished name of the entry to be compared using the attribute value assertion.
 
Methods inherited from interface org.apache.directory.api.ldap.model.message.SingleReplyRequest
getResponseType
 
Methods inherited from interface org.apache.directory.api.ldap.model.message.ResultResponseRequest
getResultResponse
 
Methods inherited from interface org.apache.directory.api.ldap.model.message.Request
hasResponse
 
Methods inherited from interface org.apache.directory.api.ldap.model.message.Message
get, getControl, getControls, getMessageId, getType, hasControl, put
 
Methods inherited from interface org.apache.directory.api.ldap.model.message.AbandonableRequest
abandon, addAbandonListener, isAbandoned
 

Field Detail

TYPE

static final MessageTypeEnum TYPE
Compare request message type enum code


RESP_TYPE

static final MessageTypeEnum RESP_TYPE
Compare response message type enum code

Method Detail

getName

Dn getName()
Gets the distinguished name of the entry to be compared using the attribute value assertion.

Returns:
the Dn of the compared entry.

setName

CompareRequest setName(Dn name)
Sets the distinguished name of the entry to be compared using the attribute value assertion.

Parameters:
name - the Dn of the compared entry.
Returns:
The CompareRequest instance

getAssertionValue

Value<?> getAssertionValue()
Gets the attribute value to use in making the comparison.

Returns:
the attribute value to used in comparison.

setAssertionValue

CompareRequest setAssertionValue(String value)
Sets the attribute value to use in the comparison.

Parameters:
value - the attribute value used in comparison.
Returns:
The CompareRequest instance

setAssertionValue

CompareRequest setAssertionValue(byte[] value)
Sets the attribute value to use in the comparison.

Parameters:
value - the attribute value used in comparison.
Returns:
The CompareRequest instance

getAttributeId

String getAttributeId()
Gets the attribute id use in making the comparison.

Returns:
the attribute id used in comparison.

setAttributeId

CompareRequest setAttributeId(String attrId)
Sets the attribute id used in the comparison.

Parameters:
attrId - the attribute id used in comparison.
Returns:
The CompareRequest instance

setMessageId

CompareRequest setMessageId(int messageId)
Sets the Message ID for this request

Specified by:
setMessageId in interface Message
Parameters:
messageId - The message Id
Returns:
A Message reference

addControl

CompareRequest addControl(Control control)
                          throws MessageException
Adds a control to this Message.

Specified by:
addControl in interface Message
Parameters:
control - the control to add.
Returns:
A Message reference
Throws:
MessageException - if controls cannot be added to this Message or the control is not known etc.

addAllControls

CompareRequest addAllControls(Control[] controls)
                              throws MessageException
Adds an array of controls to this Message.

Specified by:
addAllControls in interface Message
Parameters:
controls - the controls to add.
Returns:
A Message reference
Throws:
MessageException - if controls cannot be added to this Message or they are not known etc.

removeControl

CompareRequest removeControl(Control control)
                             throws MessageException
Deletes a control removing it from this Message.

Specified by:
removeControl in interface Message
Parameters:
control - the control to remove.
Returns:
A Message reference
Throws:
MessageException - if controls cannot be added to this Message or the control is not known etc.


Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.