|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opends.server.replication.protocol.ReplicationMsg
org.opends.server.replication.protocol.UpdateMsg
org.opends.server.replication.protocol.LDAPUpdateMsg
org.opends.server.replication.protocol.AddMsg
public class AddMsg
This class is used to exchange Add operation between LDAP servers and replication servers.
| Field Summary |
|---|
| Fields inherited from class org.opends.server.replication.protocol.LDAPUpdateMsg |
|---|
bytes, dn, encodedEclIncludes, uniqueId |
| Fields inherited from class org.opends.server.replication.protocol.UpdateMsg |
|---|
assuredFlag, assuredMode, changeNumber, protocolVersion, safeDataLevel |
| Constructor Summary | |
|---|---|
AddMsg(byte[] in)
Creates a new Add message from a byte[]. |
|
AddMsg(ChangeNumber cn,
java.lang.String dn,
java.lang.String uniqueId,
java.lang.String parentId,
Attribute objectClass,
java.util.Collection<Attribute> userAttributes,
java.util.Collection<Attribute> operationalAttributes)
Creates a new AddMessage. |
|
AddMsg(ChangeNumber cn,
java.lang.String dn,
java.lang.String uniqueId,
java.lang.String parentId,
java.util.Map<ObjectClass,java.lang.String> objectClasses,
java.util.Map<AttributeType,java.util.List<Attribute>> userAttributes,
java.util.Map<AttributeType,java.util.List<Attribute>> operationalAttributes)
Creates a new AddMessage. |
|
AddMsg(PostOperationAddOperation op)
Creates a new AddMessage. |
|
| Method Summary | |
|---|---|
void |
addAttribute(java.lang.String name,
java.lang.String value)
Add the specified attribute/attribute value in the entry contained in this AddMsg. |
AddOperationBasis |
createOperation(InternalClientConnection connection,
java.lang.String newDn)
Create and Operation from the message using the provided DN. |
java.util.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_V4()
Get the byte array representation of this Message. |
java.lang.String |
getParentUid()
Get the parent unique id of this add msg. |
void |
setParentUid(java.lang.String uid)
Set the parent unique id of this add msg. |
int |
size()
Return the number of bytes used by this message. |
java.lang.String |
toString()
|
| Methods inherited from class org.opends.server.replication.protocol.LDAPUpdateMsg |
|---|
createOperation, decodeAttributes, decodeHeader_V1, decodeHeader, decodeRawAttributes, encode, encodeHeader_V1, encodeHeader, generateMsg, getBytes, getBytes, getDn, getEclIncludes, getUniqueId, headerSize, setDn, setEclIncludes |
| Methods inherited from class org.opends.server.replication.protocol.UpdateMsg |
|---|
compareTo, decodeHeader, equals, getAssuredMode, getChangeNumber, getPayload, getSafeDataLevel, getVersion, hashCode, isAssured, setAssured, setAssuredMode, setSafeDataLevel |
| Methods inherited from class org.opends.server.replication.protocol.ReplicationMsg |
|---|
addByteArray, generateMsg, getNextLength |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AddMsg(PostOperationAddOperation op)
op - the operation to use when creating the message
public AddMsg(ChangeNumber cn,
java.lang.String dn,
java.lang.String uniqueId,
java.lang.String parentId,
java.util.Map<ObjectClass,java.lang.String> objectClasses,
java.util.Map<AttributeType,java.util.List<Attribute>> userAttributes,
java.util.Map<AttributeType,java.util.List<Attribute>> operationalAttributes)
cn - ChangeNumber 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.objectClasses - objectclass of the added entry.userAttributes - user attributes of the added entry.operationalAttributes - operational attributes of the added entry.
public AddMsg(ChangeNumber cn,
java.lang.String dn,
java.lang.String uniqueId,
java.lang.String parentId,
Attribute objectClass,
java.util.Collection<Attribute> userAttributes,
java.util.Collection<Attribute> operationalAttributes)
cn - ChangeNumber 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 java.util.zip.DataFormatException,
java.io.UnsupportedEncodingException
in - The byte[] from which the operation must be read.
java.util.zip.DataFormatException - The input byte[] is not a valid AddMsg
java.io.UnsupportedEncodingException - If UTF8 is not supported by the jvm| Method Detail |
|---|
public AddOperationBasis createOperation(InternalClientConnection connection,
java.lang.String newDn)
throws LDAPException,
ASN1Exception
createOperation in class LDAPUpdateMsgconnection - connection to use when creating the message.newDn - the DN to use when creating the operation.
LDAPException - In case of LDAP decoding exception.
ASN1Exception - In case of ASN1 decoding exception.
public byte[] getBytes_V1()
throws java.io.UnsupportedEncodingException
getBytes_V1 in class LDAPUpdateMsgjava.io.UnsupportedEncodingException - When the encoding of the message
failed because the UTF-8 encoding is not supported.
public byte[] getBytes_V23()
throws java.io.UnsupportedEncodingException
getBytes_V23 in class LDAPUpdateMsgjava.io.UnsupportedEncodingException - When the encoding of the message
failed because the UTF-8 encoding is not supported.
public byte[] getBytes_V4()
throws java.io.UnsupportedEncodingException
getBytes_V4 in class LDAPUpdateMsgjava.io.UnsupportedEncodingException - When the encoding of the message
failed because the UTF-8 encoding is not supported.public java.lang.String toString()
toString in class java.lang.Object
public void addAttribute(java.lang.String name,
java.lang.String value)
throws ASN1Exception
name - The name of the attribute to add.value - The value of the attribute to add.
ASN1Exception - When this Msg is not valid.
public java.util.List<Attribute> getAttributes()
throws LDAPException,
ASN1Exception
LDAPException - In case of LDAP decoding exception
ASN1Exception - In case of ASN1 decoding exceptionpublic void setParentUid(java.lang.String uid)
uid - the parent unique id.public java.lang.String getParentUid()
public int size()
size in class LDAPUpdateMsg
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||