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.Dn dn,
String uniqueId,
String parentId,
Attribute objectClass,
Iterable<Attribute> userAttributes,
Iterable<Attribute> operationalAttributes)
Creates a new AddMessage.
|
AddMsg(CSN csn,
org.forgerock.opendj.ldap.Dn dn,
String entryUUID,
String parentEntryUUID,
Map<org.forgerock.opendj.ldap.schema.ObjectClass,String> objectClasses,
Map<org.forgerock.opendj.ldap.schema.AttributeType,List<Attribute>> userAttributes,
Map<org.forgerock.opendj.ldap.schema.AttributeType,List<Attribute>> operationalAttributes)
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[] |
getBytes_V1()
Get the byte array representation of this message.
|
byte[] |
getBytes_V23()
Get the byte array representation of this message.
|
byte[] |
getBytes_V45(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.Dn dn, String entryUUID, String parentEntryUUID, Map<org.forgerock.opendj.ldap.schema.ObjectClass,String> objectClasses, Map<org.forgerock.opendj.ldap.schema.AttributeType,List<Attribute>> userAttributes, Map<org.forgerock.opendj.ldap.schema.AttributeType,List<Attribute>> operationalAttributes)
csn
- CSN of the add.dn
- DN of the added entry.entryUUID
- The Unique identifier of the added entry.parentEntryUUID
- The unique Id of the parent of the added
entry.objectClasses
- objectclass of the added entry.userAttributes
- user attributes of the added entry.operationalAttributes
- operational attributes of the added entry.public AddMsg(CSN csn, org.forgerock.opendj.ldap.Dn dn, String uniqueId, String parentId, Attribute objectClass, Iterable<Attribute> userAttributes, Iterable<Attribute> operationalAttributes)
csn
- CSN of the add.dn
- DN of the added entry.uniqueId
- The Unique identifier of the added entry.parentId
- The unique Id of the parent of the added entry.objectClass
- objectclass of the added entry.userAttributes
- user attributes of the added entry.operationalAttributes
- operational attributes 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[] getBytes_V1()
LDAPUpdateMsg
getBytes_V1
in class LDAPUpdateMsg
public byte[] getBytes_V23()
LDAPUpdateMsg
getBytes_V23
in class LDAPUpdateMsg
public byte[] getBytes_V45(short protocolVersion)
LDAPUpdateMsg
getBytes_V45
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.