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 voidaddAttribute(String type)Create a new attributevoidaddAttributeValue(Object value)Add a new value to the current attributeAttributegetCurrentAttribute()EntrygetEntry()Get the entry.DngetObjectName()Get the entry DnMessageTypeEnumgetType()Gets the LDAP message type code associated with this Message.voidsetEntry(Entry entry)Initialize the entry.voidsetObjectName(Dn objectName)Set the entry DnElementtoDsml(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
clone, equals, finalize, 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:
getTypein interfaceMessage- Overrides:
getTypein classAbstractDsmlMessageDecorator<SearchResultEntry>- Returns:
- the message type code.
-
toDsml
public Element toDsml(Element root)
Converts the request/reponse to its XML representation in the DSMLv2 format- Specified by:
toDsmlin 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:
getObjectNamein interfaceSearchResultEntry- Returns:
- Returns the objectName.
-
setObjectName
public void setObjectName(Dn objectName)
Set the entry Dn- Specified by:
setObjectNamein interfaceSearchResultEntry- Parameters:
objectName- The objectName to set.
-
getEntry
public Entry getEntry()
Get the entry.- Specified by:
getEntryin interfaceSearchResultEntry- Returns:
- Returns the entry.
-
setEntry
public void setEntry(Entry entry)
Initialize the entry.- Specified by:
setEntryin interfaceSearchResultEntry- Parameters:
entry- the entry
-
-