Class SearchResultEntryDsml
- java.lang.Object
-
- org.apache.directory.api.dsmlv2.AbstractDsmlMessageDecorator<E>
-
- org.apache.directory.api.dsmlv2.response.AbstractResponseDsml<SearchResultEntry>
-
- org.apache.directory.api.dsmlv2.response.SearchResultEntryDsml
-
- All Implemented Interfaces:
DsmlDecorator<SearchResultEntry>
,Message
,Response
,SearchResultEntry
public class SearchResultEntryDsml extends AbstractResponseDsml<SearchResultEntry> implements SearchResultEntry
DSML Decorator for SearchResultEntry- Author:
- Apache Directory Project
-
-
Constructor Summary
Constructors Constructor Description SearchResultEntryDsml(LdapApiService codec)
Creates a new getDecoratedMessage() of SearchResultEntryDsml.SearchResultEntryDsml(LdapApiService codec, SearchResultEntry ldapMessage)
Creates a new getDecoratedMessage() of SearchResultEntryDsml.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAttribute(String type)
Create a new attributevoid
addAttributeValue(Object value)
Add a new value to the current attributeAttribute
getCurrentAttribute()
Entry
getEntry()
Get the entry.Dn
getObjectName()
Get the entry DnMessageTypeEnum
getType()
Gets the LDAP message type code associated with this Message.void
setEntry(Entry entry)
Initialize the entry.void
setObjectName(Dn objectName)
Set the entry Dnorg.dom4j.Element
toDsml(org.dom4j.Element root)
Converts the request/reponse to its XML representation in the DSMLv2 format-
Methods inherited from class org.apache.directory.api.dsmlv2.AbstractDsmlMessageDecorator
addAllControls, addControl, get, getCodecService, getControl, getControls, getCurrentControl, getDecorated, getMessageId, hasControl, put, removeControl, setMessageId
-
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.Message
addAllControls, addControl, get, getControl, getControls, getMessageId, hasControl, put, removeControl, setMessageId
-
-
-
-
Constructor Detail
-
SearchResultEntryDsml
public SearchResultEntryDsml(LdapApiService codec)
Creates a new getDecoratedMessage() of SearchResultEntryDsml.- Parameters:
codec
- The LDAP Service to use
-
SearchResultEntryDsml
public SearchResultEntryDsml(LdapApiService codec, SearchResultEntry ldapMessage)
Creates a new getDecoratedMessage() of SearchResultEntryDsml.- Parameters:
codec
- The LDAP Service to useldapMessage
- the message to decorate
-
-
Method Detail
-
getCurrentAttribute
public Attribute getCurrentAttribute()
- Returns:
- The current ATtributeType
-
addAttribute
public void addAttribute(String type) throws LdapException
Create a new attribute- Parameters:
type
- The attribute's type- Throws:
LdapException
- If we can't add the new attributeType
-
addAttributeValue
public void addAttributeValue(Object value) throws LdapException
Add a new value to the current attribute- Parameters:
value
- The added value- Throws:
LdapException
- If we can't add the new attributeType
-
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<SearchResultEntry>
- Returns:
- the message type code.
-
toDsml
public org.dom4j.Element toDsml(org.dom4j.Element root)
Converts the request/reponse to its XML representation in the DSMLv2 format- Specified by:
toDsml
in interfaceDsmlDecorator<SearchResultEntry>
- Parameters:
root
- the root dom4j Element- Returns:
- the dom4j Element corresponding to the entry.
-
getObjectName
public Dn getObjectName()
Get the entry Dn- Specified by:
getObjectName
in interfaceSearchResultEntry
- Returns:
- Returns the objectName.
-
setObjectName
public void setObjectName(Dn objectName)
Set the entry Dn- Specified by:
setObjectName
in interfaceSearchResultEntry
- Parameters:
objectName
- The objectName to set.
-
getEntry
public Entry getEntry()
Get the entry.- Specified by:
getEntry
in interfaceSearchResultEntry
- Returns:
- Returns the entry.
-
setEntry
public void setEntry(Entry entry)
Initialize the entry.- Specified by:
setEntry
in interfaceSearchResultEntry
- Parameters:
entry
- the entry
-
-