public class AddMsg extends LDAPUpdateMsg
MSG_TYPE_DISK_ENCODING
Constructor and Description |
---|
AddMsg(byte[] in)
Creates a new Add message from a byte[].
|
AddMsg(CSN csn,
Entry entry,
String entryUuid,
String parentEntryUuid)
Creates a new AddMessage.
|
Modifier and Type | Method and Description |
---|---|
void |
addAttribute(String name,
Object value)
Add the specified attribute/attribute value in the entry contained in this AddMsg.
|
AddRequest |
createRequest(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[] |
getBytesV4ToLatest(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, generateMsg, getBytes, getDN, getEclIncludes, getEntryUUID, setDN, setEclIncludes
compareTo, equals, getBytes, getCSN, getVersion, hashCode
decodeMsg, isRetryable
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 AddRequest createRequest(Dn newDN)
LDAPUpdateMsg
createRequest
in class LDAPUpdateMsg
newDN
- the DN to use when creating the request.public byte[] getBytesV1()
LDAPUpdateMsg
This uses the version 1 of the replication protocol (used for compatibility).
getBytesV1
in class LDAPUpdateMsg
public byte[] getBytesV23()
LDAPUpdateMsg
This uses the version 2 of the replication protocol (used for compatibility).
getBytesV23
in class LDAPUpdateMsg
public byte[] getBytesV4ToLatest(short protocolVersion)
LDAPUpdateMsg
This uses the provided version number which must be at least version 4.
getBytesV4ToLatest
in class LDAPUpdateMsg
protocolVersion
- the actual protocol version to encode intopublic void addAttribute(String name, Object value)
name
- The name of the attribute to add.value
- The value of the attribute to add.public List<Attribute> getAttributes()
public void setParentEntryUUID(String entryUUID)
entryUUID
- the parent unique id.public String getParentEntryUUID()
public int size()
UpdateMsg
size
in class LDAPUpdateMsg
Copyright 2010-2022 ForgeRock AS.