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 CompareRequestaddAllControls(Control[] controls)Adds an array of controls to this Message.CompareRequestaddControl(Control control)Adds a control to this Message.ValuegetAssertionValue()Gets the attribute value to use in making the comparison.StringgetAttributeDesc()Get the attribute descriptionStringgetAttributeId()Gets the attribute id use in making the comparison.DngetName()Get the entry to be comparedMessageTypeEnumgetResponseType()Gets the protocol response message type for this request which produces at least one response.MessageTypeEnumgetType()Gets the LDAP message type code associated with this Message.CompareRequestremoveControl(Control control)Deletes a control removing it from this Message.CompareRequestsetAssertionValue(byte[] value)Sets the attribute value to use in the comparison.voidsetAssertionValue(Object assertionValue)Set the assertion valueCompareRequestsetAssertionValue(String value)Sets the attribute value to use in the comparison.voidsetAttributeDesc(String attributeDesc)Set the attribute descriptionCompareRequestsetAttributeId(String attrId)Sets the attribute id used in the comparison.CompareRequestsetMessageId(int messageId)Sets the Message ID for this requestCompareRequestsetName(Dn entry)Set the entry to be comparedElementtoDsml(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
getRequestName, 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
clone, equals, finalize, 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:
getTypein interfaceMessage- Overrides:
getTypein classAbstractDsmlMessageDecorator<CompareRequest>- Returns:
- the message type code.
-
toDsml
public Element toDsml(Element root)
Creates the Request Element and adds RequestID and Controls.- Specified by:
toDsmlin interfaceDsmlDecorator<CompareRequest>- Overrides:
toDsmlin 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:
getNamein interfaceCompareRequest- Returns:
- Returns the entry.
-
setName
public CompareRequest setName(Dn entry)
Set the entry to be compared- Specified by:
setNamein 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:
getResponseTypein 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:
setAssertionValuein 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:
setAssertionValuein 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:
getAttributeIdin interfaceCompareRequest- Returns:
- the attribute id used in comparison.
-
setAttributeId
public CompareRequest setAttributeId(String attrId)
Sets the attribute id used in the comparison.- Specified by:
setAttributeIdin 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:
getAssertionValuein interfaceCompareRequest- Returns:
- the attribute value to used in comparison.
-
setMessageId
public CompareRequest setMessageId(int messageId)
Sets the Message ID for this request- Specified by:
setMessageIdin interfaceCompareRequest- Specified by:
setMessageIdin interfaceMessage- Overrides:
setMessageIdin 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:
addControlin interfaceCompareRequest- Specified by:
addControlin interfaceMessage- Overrides:
addControlin 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:
addAllControlsin interfaceCompareRequest- Specified by:
addAllControlsin interfaceMessage- Overrides:
addAllControlsin 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:
removeControlin interfaceCompareRequest- Specified by:
removeControlin interfaceMessage- Overrides:
removeControlin classAbstractDsmlMessageDecorator<CompareRequest>- Parameters:
control- the control to remove.- Returns:
- A Message reference
-
-