public class AddMsg extends LDAPUpdateMsg
bytes, dn, encodedEclIncludes, entryUUID
assuredFlag, assuredMode, csn, protocolVersion, safeDataLevel
MSG_TYPE_DISK_ENCODING
Constructor and Description |
---|
AddMsg(byte[] in)
Creates a new Add message from a byte[].
|
AddMsg(CSN csn,
org.forgerock.opendj.ldap.Entry entry,
String entryUuid,
String parentEntryUuid)
Creates a new AddMessage.
|
AddMsg(CSN csn,
Entry entry,
String entryUuid,
String parentEntryUuid)
Creates a new AddMessage.
|
Modifier and Type | Method and Description |
---|---|
void |
addAttribute(String name,
String value)
Add the specified attribute/attribute value in the entry contained in this AddMsg.
|
org.forgerock.opendj.ldap.messages.AddRequest |
createRequest(org.forgerock.opendj.ldap.Dn newDN)
Create a request from this message using the provided DN.
|
List<Attribute> |
getAttributes()
Get the attributes of this add msg.
|
byte[] |
getBytesV1()
Get the byte array representation of this message.
|
byte[] |
getBytesV23()
Get the byte array representation of this message.
|
byte[] |
getBytesV45(short protocolVersion)
Get the byte array representation of this message.
|
String |
getParentEntryUUID()
Get the parent unique id of this add msg.
|
void |
setParentEntryUUID(String entryUUID)
Set the parent unique id of this add msg.
|
int |
size()
Return the number of bytes used by this message.
|
String |
toString() |
createRequest, encode, encodeHeader, generateMsg, getBytes, getDN, getEclIncludes, getEntryUUID, headerSize, setDN, setEclIncludes
compareTo, contributesToDomainState, decodeHeader, equals, getAssuredMode, getBytes, getCSN, getPayload, getSafeDataLevel, getVersion, hashCode, isAssured, setAssured, setAssuredMode, setSafeDataLevel
generateMsg
public AddMsg(CSN csn, org.forgerock.opendj.ldap.Entry entry, String entryUuid, String parentEntryUuid)
csn
- CSN of the add.entry
- the added entry.entryUuid
- The Unique identifier of the added entry.parentEntryUuid
- The unique Id of the parent of the added entry.public AddMsg(CSN csn, Entry entry, String entryUuid, String parentEntryUuid)
csn
- CSN of the add.entry
- the added entry.entryUuid
- The Unique identifier of the added entry.parentEntryUuid
- The unique Id of the parent of the added entry.public AddMsg(byte[] in) throws DataFormatException
in
- The byte[] from which the operation must be read.DataFormatException
- The input byte[] is not a valid AddMsgpublic org.forgerock.opendj.ldap.messages.AddRequest createRequest(org.forgerock.opendj.ldap.Dn newDN) throws LDAPException, org.forgerock.opendj.ldap.DecodeException
LDAPUpdateMsg
createRequest
in class LDAPUpdateMsg
newDN
- the DN to use when creating the request.LDAPException
- In case of LDAP decoding exceptionorg.forgerock.opendj.ldap.DecodeException
public byte[] getBytesV1()
LDAPUpdateMsg
getBytesV1
in class LDAPUpdateMsg
public byte[] getBytesV23()
LDAPUpdateMsg
getBytesV23
in class LDAPUpdateMsg
public byte[] getBytesV45(short protocolVersion)
LDAPUpdateMsg
getBytesV45
in class LDAPUpdateMsg
protocolVersion
- the actual protocol version to encode intopublic void addAttribute(String name, String value) throws org.forgerock.opendj.ldap.DecodeException
name
- The name of the attribute to add.value
- The value of the attribute to add.org.forgerock.opendj.ldap.DecodeException
- When this Msg is not valid.public List<Attribute> getAttributes() throws LDAPException, org.forgerock.opendj.ldap.DecodeException
LDAPException
- In case of LDAP decoding exceptionorg.forgerock.opendj.ldap.DecodeException
- In case of ASN1 decoding exceptionpublic void setParentEntryUUID(String entryUUID)
entryUUID
- the parent unique id.public String getParentEntryUUID()
public int size()
UpdateMsg
size
in class LDAPUpdateMsg
Copyright © 2010–2017 ForgeRock AS. All rights reserved.