public abstract class LDAPUpdateMsg extends UpdateMsg
Modifier and Type | Field and Description |
---|---|
protected byte[] |
bytes
Encoded form of the LDAPUpdateMsg.
|
protected Dn |
dn
The DN on which the update was originally done.
|
protected String |
entryUUID
The entryUUID of the entry that was updated.
|
assuredFlag, assuredMode, csn, protocolVersion, safeDataLevel
MSG_TYPE_DISK_ENCODING
Modifier | Constructor and Description |
---|---|
protected |
LDAPUpdateMsg()
Creates a new UpdateMsg.
|
Modifier and Type | Method and Description |
---|---|
ChangeRecord |
createRequest()
Create a request from this message.
|
abstract ChangeRecord |
createRequest(Dn newDN)
Create a request from this message using the provided DN.
|
void |
encode()
Do all the work necessary for the encoding.
|
ByteArrayBuilder |
encodeHeader(byte msgType,
short protocolVersion)
Encode the common header for all the UpdateMsg.
|
static LDAPUpdateMsg |
generateMsg(PostOperationOperation op)
Generates an Update message with the provided information.
|
byte[] |
getBytes(short protocolVersion)
This implementation is only called during unit testing, so we are free to force the protocol version.
|
protected abstract byte[] |
getBytesV1()
Get the byte array representation of this message.
|
protected abstract byte[] |
getBytesV23()
Get the byte array representation of this message.
|
protected abstract byte[] |
getBytesV45(short protocolVersion)
Get the byte array representation of this message.
|
Dn |
getDN()
Get the DN on which the operation happened.
|
ArrayList<RawAttribute> |
getEclIncludes()
Returns the list of entry attributes.
|
String |
getEntryUUID()
Get the entryUUID of the entry on which the operation happened.
|
void |
setDN(Dn dn)
Set the DN.
|
void |
setEclIncludes(Collection<Attribute> entryAttrs)
Set a provided list of entry attributes.
|
abstract int |
size()
Return the number of bytes used by this message.
|
compareTo, contributesToDomainState, decodeHeader, equals, getAssuredMode, getBytes, getCSN, getPayload, getSafeDataLevel, getVersion, hashCode, isAssured, setAssured, setAssuredMode, setSafeDataLevel
generateMsg
protected Dn dn
protected String entryUUID
protected byte[] bytes
public static LDAPUpdateMsg generateMsg(PostOperationOperation op)
op
- The operation for which the message must be created.public Dn getDN()
public void setDN(Dn dn)
dn
- The dn that must now be used for this message.public String getEntryUUID()
public ChangeRecord createRequest() throws IOException
LdapException
- In case of LDAP decoding exception.IOException
- In case of ASN1 decoding exception.public abstract ChangeRecord createRequest(Dn newDN) throws IOException
newDN
- the DN to use when creating the request.LdapException
- In case of LDAP decoding exceptionIOException
- In case of ASN1 decoding exceptionpublic void encode()
public ByteArrayBuilder encodeHeader(byte msgType, short protocolVersion)
UpdateMsg
encodeHeader
in class UpdateMsg
msgType
- The type of UpdateMsg to encode.protocolVersion
- The ProtocolVersion to use when encoding.public byte[] getBytes(short protocolVersion)
UpdateMsg
protected abstract byte[] getBytesV1()
protected abstract byte[] getBytesV23()
protected abstract byte[] getBytesV45(short protocolVersion)
protocolVersion
- the actual protocol version to encode intopublic abstract int size()
UpdateMsg
public void setEclIncludes(Collection<Attribute> entryAttrs)
entryAttrs
- The provided list of entry attributes.public ArrayList<RawAttribute> getEclIncludes()
Copyright 2010-2018 ForgeRock AS.