@NotExtensible @ThreadSafety(level=INTERFACE_THREADSAFE) public abstract class AuditLogMessage extends java.lang.Object implements java.io.Serializable
NOTE: This class, and other classes within the
com.unboundid.ldap.sdk.unboundidds
package structure, are only
supported for use against Ping Identity, UnboundID, and
Nokia/Alcatel-Lucent 8661 server products. These classes provide support
for proprietary functionality or for external specifications that are not
considered stable or mature enough to be guaranteed to work in an
interoperable way with other types of LDAP servers.
Modifier | Constructor and Description |
---|---|
protected |
AuditLogMessage(java.util.List<java.lang.String> logMessageLines)
Creates a new audit log message from the provided set of lines.
|
Modifier and Type | Method and Description |
---|---|
protected static ReadOnlyEntry |
decodeCommentedEntry(java.lang.String header,
java.util.List<java.lang.String> logMessageLines,
java.lang.String entryDN)
Decodes an entry (or list of attributes) from the commented header
contained in the log message lines.
|
java.lang.String |
getAlternateAuthorizationDN()
Retrieves the alternate authorization DN for this audit log message, if
available.
|
abstract LDIFChangeRecord |
getChangeRecord()
Retrieves an LDIF change record that encapsulates the change represented by
this audit log message.
|
abstract ChangeType |
getChangeType()
Retrieves the change type for this audit log message.
|
java.lang.String |
getCommentedHeaderLine()
Retrieves the line that comprises the header for this log message,
including the leading octothorpe (#) and space that make it a comment.
|
java.lang.Long |
getConnectionID()
Retrieves the connection ID for the connection on which the change was
requested, if available.
|
abstract java.lang.String |
getDN()
Retrieves the DN of the entry targeted by the associated operation.
|
java.util.Map<java.lang.String,java.lang.String> |
getHeaderNamedValues()
Retrieves a map of the name-value pairs contained in the header for this
log message.
|
java.lang.String |
getInstanceName()
Retrieves the server instance name for this audit log message, if
available.
|
IntermediateClientRequestControl |
getIntermediateClientRequestControl()
Retrieves an intermediate client request control with information about the
downstream processing for the associated operation, if available.
|
java.util.List<java.lang.String> |
getLogMessageLines()
Retrieves the lines that comprise the complete audit log message.
|
protected static java.lang.Boolean |
getNamedValueAsBoolean(java.lang.String name,
java.util.Map<java.lang.String,java.lang.String> nameValuePairs)
Retrieves the value of the header property with the given name as a
Boolean object. |
protected static java.lang.Long |
getNamedValueAsLong(java.lang.String name,
java.util.Map<java.lang.String,java.lang.String> nameValuePairs)
Retrieves the value of the header property with the given name as a
Long object. |
java.lang.Long |
getOperationID()
Retrieves the connection ID for the connection on which the change was
requested, if available.
|
OperationPurposeRequestControl |
getOperationPurposeRequestControl()
Retrieves an operation purpose request control with information about the
purpose for the associated operation, if available.
|
java.lang.String |
getOrigin()
Retrieves the origin for this audit log message, if available.
|
java.lang.String |
getProductName()
Retrieves the server product name for this audit log message, if available.
|
java.lang.String |
getReplicationChangeID()
Retrieves the replication change ID for this audit log message, if
available.
|
java.util.List<java.lang.String> |
getRequestControlOIDs()
Retrieves a list of the OIDs of the request controls included in the
operation request, if available.
|
java.lang.String |
getRequesterDN()
Retrieves the DN of the user that requested the change, if available.
|
java.lang.String |
getRequesterIPAddress()
Retrieves the IP address of the client that requested the change, if
available.
|
abstract java.util.List<LDIFChangeRecord> |
getRevertChangeRecords()
Retrieves a list of the change records that can be used to revert the
changes described by this audit log message.
|
java.lang.String |
getStartupID()
Retrieves the unique identifier generated when the server was started, if
available.
|
java.lang.Long |
getThreadID()
Retrieves the identifier for the server thread that processed the change,
if available.
|
java.util.Date |
getTimestamp()
Retrieves the timestamp for this audit log message.
|
java.lang.String |
getTransactionID()
Retrieves the transaction ID for this audit log message, if available.
|
java.lang.Long |
getTriggeredByConnectionID()
Retrieves the connection ID for the external operation that triggered the
internal operation with which this audit log message is associated, if
available.
|
java.lang.Long |
getTriggeredByOperationID()
Retrieves the operation ID for the external operation that triggered the
internal operation with which this audit log message is associated, if
available.
|
java.lang.String |
getUncommentedHeaderLine()
Retrieves the line that comprises the header for this log message, without
the leading octothorpe (#) and space that make it a comment.
|
java.lang.Boolean |
getUsingAdminSessionWorkerThread()
Retrieves the value of the flag indicating whether the associated operation
was processed using an administrative session worker thread, if available.
|
abstract boolean |
isRevertible()
Indicates whether it is possible to use the
getRevertChangeRecords() method to obtain a list of LDIF change
records that can be used to revert the changes described by this audit log
message. |
java.lang.String |
toMultiLineString()
Retrieves a multi-line string representation of this audit log message.
|
java.lang.String |
toString()
Retrieves a single-line string representation of this audit log message.
|
abstract void |
toString(java.lang.StringBuilder buffer)
Appends a single-line string representation of this audit log message to
the provided buffer.
|
protected AuditLogMessage(@NotNull java.util.List<java.lang.String> logMessageLines) throws AuditLogException
logMessageLines
- The lines that comprise the log message. It must
not be null
or empty, and it must not
contain any blank lines, although it may contain
comments. In fact, it must contain at least one
comment line that appears before any non-comment
lines (but possibly after other comment lines)
that serves as the message header.AuditLogException
- If a problem is encountered while processing
the provided list of log message lines.@Nullable protected static java.lang.Boolean getNamedValueAsBoolean(@NotNull java.lang.String name, @NotNull java.util.Map<java.lang.String,java.lang.String> nameValuePairs)
Boolean
object.name
- The name of the property to retrieve. It must not
be null
, and it will be treated in a
case-sensitive manner.nameValuePairs
- The map containing the header properties as
name-value pairs. It must not be null
.Boolean
, or
null
if the property is not defined or if it cannot be
parsed as a Boolean
.@Nullable protected static java.lang.Long getNamedValueAsLong(@NotNull java.lang.String name, @NotNull java.util.Map<java.lang.String,java.lang.String> nameValuePairs)
Long
object.name
- The name of the property to retrieve. It must not
be null
, and it will be treated in a
case-sensitive manner.nameValuePairs
- The map containing the header properties as
name-value pairs. It must not be null
.Long
, or
null
if the property is not defined or if it cannot be
parsed as a Long
.@Nullable protected static ReadOnlyEntry decodeCommentedEntry(@NotNull java.lang.String header, @NotNull java.util.List<java.lang.String> logMessageLines, @Nullable java.lang.String entryDN)
header
- The header line that appears before the encoded
entry.logMessageLines
- The lines that comprise the audit log message.entryDN
- The DN to use for the entry that is read. It
should be null
if the commented entry
includes a DN, and non-null
if the
commented entry does not include a DN.null
if it is not included in the header or if it cannot
be decoded. If the commented entry does not include a DN, then
the DN of the entry returned will be the null DN.@NotNull public final java.util.List<java.lang.String> getLogMessageLines()
@NotNull public final java.lang.String getCommentedHeaderLine()
@NotNull public final java.lang.String getUncommentedHeaderLine()
@NotNull public final java.util.Date getTimestamp()
@NotNull public final java.util.Map<java.lang.String,java.lang.String> getHeaderNamedValues()
@Nullable public final java.lang.String getProductName()
null
if it is not available.@Nullable public final java.lang.String getInstanceName()
null
if it is not available.@Nullable public final java.lang.String getStartupID()
null
if it is not available.@Nullable public final java.lang.Long getThreadID()
null
if it is not available.@Nullable public final java.lang.String getRequesterDN()
null
if
it is not available.@Nullable public final java.lang.String getRequesterIPAddress()
null
if it is not available.@Nullable public final java.lang.Long getConnectionID()
null
if it is not available.@Nullable public final java.lang.Long getOperationID()
null
if it is not available.@Nullable public final java.lang.Long getTriggeredByConnectionID()
null
if it is not available.@Nullable public final java.lang.Long getTriggeredByOperationID()
null
if it is not available.@Nullable public final java.lang.String getReplicationChangeID()
null
if it is not available.@Nullable public final java.lang.String getAlternateAuthorizationDN()
null
if it is not available.@Nullable public final java.lang.String getTransactionID()
null
if
it is not available.@Nullable public final java.lang.String getOrigin()
null
if it is
not available.@Nullable public final java.lang.Boolean getUsingAdminSessionWorkerThread()
Boolean.TRUE
if it is known that the associated operation
was processed using an administrative session worker thread,
Boolean.FALSE
if it is known that the associated operation
was not processed using an administrative session worker thread,
or null
if it is not available.@Nullable public final java.util.List<java.lang.String> getRequestControlOIDs()
null
if it is not available.@Nullable public final OperationPurposeRequestControl getOperationPurposeRequestControl()
null
if it is not
available.@Nullable public final IntermediateClientRequestControl getIntermediateClientRequestControl()
null
if it is not available.@NotNull public abstract java.lang.String getDN()
@NotNull public abstract ChangeType getChangeType()
@NotNull public abstract LDIFChangeRecord getChangeRecord()
public abstract boolean isRevertible()
getRevertChangeRecords()
method to obtain a list of LDIF change
records that can be used to revert the changes described by this audit log
message.true
if it is possible to use the
getRevertChangeRecords()
method to obtain a list of LDIF
change records that can be used to revert the changes described
by this audit log message, or false
if not.@NotNull public abstract java.util.List<LDIFChangeRecord> getRevertChangeRecords() throws AuditLogException
AuditLogException
- If this audit log message cannot be reverted.@NotNull public final java.lang.String toString()
getUncommentedHeaderLine()
, but will also contain additional
name-value pairs that are pertinent to the type of operation that the audit
log message represents.toString
in class java.lang.Object
public abstract void toString(@NotNull java.lang.StringBuilder buffer)
getUncommentedHeaderLine()
, but will also contain additional
name-value pairs that are pertinent to the type of operation that the audit
log message represents.buffer
- The buffer to which the information should be appended.@NotNull public final java.lang.String toMultiLineString()