Class CompareRequestDsml
- java.lang.Object
-
- org.apache.directory.api.dsmlv2.AbstractDsmlMessageDecorator<E>
-
- org.apache.directory.api.dsmlv2.request.AbstractRequestDsml<E>
-
- org.apache.directory.api.dsmlv2.request.AbstractResultResponseRequestDsml<CompareRequest,CompareResponse>
-
- org.apache.directory.api.dsmlv2.request.CompareRequestDsml
-
- All Implemented Interfaces:
DsmlDecorator<CompareRequest>
,AbandonableRequest
,CompareRequest
,Message
,Request
,ResultResponseRequest
,SingleReplyRequest
public class CompareRequestDsml extends AbstractResultResponseRequestDsml<CompareRequest,CompareResponse> implements CompareRequest
DSML Decorator for CompareRequest- Author:
- Apache Directory Project
-
-
Constructor Summary
Constructors Constructor Description CompareRequestDsml(LdapApiService codec)
Creates a new getDecoratedMessage() of CompareRequestDsml.CompareRequestDsml(LdapApiService codec, CompareRequest ldapMessage)
Creates a new getDecoratedMessage() of CompareRequestDsml.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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
getAttributeDesc()
Get the attribute descriptionString
getAttributeId()
Gets the attribute id use in making the comparison.Dn
getName()
Get the entry to be comparedMessageTypeEnum
getResponseType()
Gets the protocol response message type for this request which produces at least one response.MessageTypeEnum
getType()
Gets the LDAP message type code associated with this Message.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.void
setAssertionValue(Object assertionValue)
Set the assertion valueCompareRequest
setAssertionValue(String value)
Sets the attribute value to use in the comparison.void
setAttributeDesc(String attributeDesc)
Set the attribute descriptionCompareRequest
setAttributeId(String attrId)
Sets the attribute id used in the comparison.CompareRequest
setMessageId(int messageId)
Sets the Message ID for this requestCompareRequest
setName(Dn entry)
Set the entry to be comparedorg.dom4j.Element
toDsml(org.dom4j.Element root)
Creates the Request Element and adds RequestID and Controls.-
Methods inherited from class org.apache.directory.api.dsmlv2.request.AbstractResultResponseRequestDsml
abandon, addAbandonListener, computeLength, encode, getResultResponse, isAbandoned
-
Methods inherited from class org.apache.directory.api.dsmlv2.request.AbstractRequestDsml
hasResponse
-
Methods inherited from class org.apache.directory.api.dsmlv2.AbstractDsmlMessageDecorator
get, getCodecService, getControl, getControls, getCurrentControl, getDecorated, getMessageId, hasControl, put
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.directory.api.ldap.model.message.AbandonableRequest
abandon, addAbandonListener, isAbandoned
-
Methods inherited from interface org.apache.directory.api.ldap.model.message.Message
get, getControl, getControls, getMessageId, hasControl, put
-
Methods inherited from interface org.apache.directory.api.ldap.model.message.Request
hasResponse
-
Methods inherited from interface org.apache.directory.api.ldap.model.message.ResultResponseRequest
getResultResponse
-
-
-
-
Constructor Detail
-
CompareRequestDsml
public CompareRequestDsml(LdapApiService codec)
Creates a new getDecoratedMessage() of CompareRequestDsml.- Parameters:
codec
- The LDAP Service to use
-
CompareRequestDsml
public CompareRequestDsml(LdapApiService codec, CompareRequest ldapMessage)
Creates a new getDecoratedMessage() of CompareRequestDsml.- Parameters:
codec
- The LDAP Service to useldapMessage
- the message to decorate
-
-
Method Detail
-
getType
public MessageTypeEnum getType()
Gets the LDAP message type code associated with this Message. Each request and response type has a unique message type code defined by the protocol in RFC 2251.- Specified by:
getType
in interfaceMessage
- Overrides:
getType
in classAbstractDsmlMessageDecorator<CompareRequest>
- Returns:
- the message type code.
-
toDsml
public org.dom4j.Element toDsml(org.dom4j.Element root)
Creates the Request Element and adds RequestID and Controls.- Specified by:
toDsml
in interfaceDsmlDecorator<CompareRequest>
- Overrides:
toDsml
in classAbstractResultResponseRequestDsml<CompareRequest,CompareResponse>
- Parameters:
root
- the root element- Returns:
- the Request Element of the given name containing
-
getName
public Dn getName()
Get the entry to be compared- Specified by:
getName
in interfaceCompareRequest
- Returns:
- Returns the entry.
-
setName
public CompareRequest setName(Dn entry)
Set the entry to be compared- Specified by:
setName
in interfaceCompareRequest
- Parameters:
entry
- The entry to set.- Returns:
- The CompareRequest instance
-
setAssertionValue
public void setAssertionValue(Object assertionValue)
Set the assertion value- Parameters:
assertionValue
- The assertionValue to set.
-
getAttributeDesc
public String getAttributeDesc()
Get the attribute description- Returns:
- Returns the attributeDesc.
-
setAttributeDesc
public void setAttributeDesc(String attributeDesc)
Set the attribute description- Parameters:
attributeDesc
- The attributeDesc to set.
-
getResponseType
public MessageTypeEnum getResponseType()
Gets the protocol response message type for this request which produces at least one response.- Specified by:
getResponseType
in interfaceSingleReplyRequest
- Returns:
- the message type of the response.
-
setAssertionValue
public CompareRequest setAssertionValue(String value)
Sets the attribute value to use in the comparison.- Specified by:
setAssertionValue
in interfaceCompareRequest
- Parameters:
value
- the attribute value used in comparison.- Returns:
- The CompareRequest instance
-
setAssertionValue
public CompareRequest setAssertionValue(byte[] value)
Sets the attribute value to use in the comparison.- Specified by:
setAssertionValue
in interfaceCompareRequest
- Parameters:
value
- the attribute value used in comparison.- Returns:
- The CompareRequest instance
-
getAttributeId
public String getAttributeId()
Gets the attribute id use in making the comparison.- Specified by:
getAttributeId
in interfaceCompareRequest
- Returns:
- the attribute id used in comparison.
-
setAttributeId
public CompareRequest setAttributeId(String attrId)
Sets the attribute id used in the comparison.- Specified by:
setAttributeId
in interfaceCompareRequest
- Parameters:
attrId
- the attribute id used in comparison.- Returns:
- The CompareRequest instance
-
getAssertionValue
public Value getAssertionValue()
Gets the attribute value to use in making the comparison.- Specified by:
getAssertionValue
in interfaceCompareRequest
- Returns:
- the attribute value to used in comparison.
-
setMessageId
public CompareRequest setMessageId(int messageId)
Sets the Message ID for this request- Specified by:
setMessageId
in interfaceCompareRequest
- Specified by:
setMessageId
in interfaceMessage
- Overrides:
setMessageId
in classAbstractDsmlMessageDecorator<CompareRequest>
- Parameters:
messageId
- The message Id- Returns:
- A Message reference
-
addControl
public CompareRequest addControl(Control control)
Adds a control to this Message.- Specified by:
addControl
in interfaceCompareRequest
- Specified by:
addControl
in interfaceMessage
- Overrides:
addControl
in classAbstractDsmlMessageDecorator<CompareRequest>
- Parameters:
control
- the control to add.- Returns:
- A Message reference
-
addAllControls
public CompareRequest addAllControls(Control[] controls)
Adds an array of controls to this Message.- Specified by:
addAllControls
in interfaceCompareRequest
- Specified by:
addAllControls
in interfaceMessage
- Overrides:
addAllControls
in classAbstractDsmlMessageDecorator<CompareRequest>
- Parameters:
controls
- the controls to add.- Returns:
- A Message reference
-
removeControl
public CompareRequest removeControl(Control control)
Deletes a control removing it from this Message.- Specified by:
removeControl
in interfaceCompareRequest
- Specified by:
removeControl
in interfaceMessage
- Overrides:
removeControl
in classAbstractDsmlMessageDecorator<CompareRequest>
- Parameters:
control
- the control to remove.- Returns:
- A Message reference
-
-