Class FloatingPointLogFieldSyntax
java.lang.Object
com.unboundid.ldap.sdk.unboundidds.logs.v2.syntax.LogFieldSyntax<Double>
com.unboundid.ldap.sdk.unboundidds.logs.v2.syntax.FloatingPointLogFieldSyntax
@ThreadSafety(level=COMPLETELY_THREADSAFE)
public final class FloatingPointLogFieldSyntax
extends LogFieldSyntax<Double>
This class defines a log field syntax for values that are floating-point
numbers. This syntax does not support redacting or tokenizing individual
components within the numbers. Redacted floating-point values will have a
string representation of "-999999.999999". Tokenized floating-point string
values will have a string representation of "-999999." followed by six digits
that correspond to a token value generated from the actual value.
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.
-
Field Summary
FieldsFields inherited from class com.unboundid.ldap.sdk.unboundidds.logs.v2.syntax.LogFieldSyntax
CARRIAGE_RETURN_CODE_POINT, DOUBLE_QUOTE_CODE_POINT, NEWLINE_CODE_POINT, OCTOTHORPE_CODE_POINT, REDACTED_STRING, TAB_CODE_POINT, TOKEN_PREFIX_STRING, TOKEN_SUFFIX_STRING -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether values that have been completely redacted still conform to this syntax.booleanIndicates whether values that have been completely tokenized still conform to this syntax.static FloatingPointLogFieldSyntaxRetrieves a singleton instance of this log field syntax.Retrieves the name for this syntax.voidlogCompletelyRedactedFieldToJSONFormattedLog(String fieldName, JSONBuffer buffer) Appends a completely redacted representation of the specified field (both field name and value) for a JSON-formatted log message to the given buffer.voidlogCompletelyRedactedFieldToTextFormattedLog(String fieldName, ByteStringBuffer buffer) Appends a completely redacted representation of the specified field (both field name and value) for a text-formatted log message to the given buffer.voidAppends a completely redacted representation of a value (without a field name, as might be suitable for a value included in a JSON array) for a JSON-formatted log message to the given buffer.voidlogCompletelyTokenizedFieldToJSONFormattedLog(String fieldName, Double fieldValue, byte[] pepper, JSONBuffer buffer) Appends a completely tokenized representation of the specified field (both field name and value) for a JSON-formatted log message to the given buffer.voidlogCompletelyTokenizedFieldToTextFormattedLog(String fieldName, Double fieldValue, byte[] pepper, ByteStringBuffer buffer) Appends a completely tokenized representation of the specified field (both field name and value) for a text-formatted log message to the given buffer.voidlogCompletelyTokenizedValueToJSONFormattedLog(Double value, byte[] pepper, JSONBuffer buffer) Appends a completely tokenized representation of the provided value (without a field name, as might be suitable for a value included in a JSON array) for a JSON-formatted log message to the given buffer.voidlogRedactedComponentsFieldToJSONFormattedLog(String fieldName, Double fieldValue, JSONBuffer buffer) Appends a representation of the specified field (both field name and value) with redacted value components for a JSON-formatted log message to the given buffer.voidlogRedactedComponentsFieldToTextFormattedLog(String fieldName, Double fieldValue, ByteStringBuffer buffer) Appends a representation of the specified field (both field name and value) with redacted value components for a text-formatted log message to the given buffer.voidlogRedactedComponentsValueToJSONFormattedLog(Double value, JSONBuffer buffer) Appends a representation of the provided value (without a field name, as might be suitable for a value included in a JSON array) with redacted components for a JSON-formatted log message to the given buffer.voidlogSanitizedFieldToJSONFormattedLog(String fieldName, Double fieldValue, JSONBuffer buffer) Appends a sanitized representation of the specified field (both field name and value) for a JSON-formatted log message to the given buffer.voidlogSanitizedFieldToTextFormattedLog(String fieldName, Double fieldValue, ByteStringBuffer buffer) Appends a sanitized representation of the specified field (both field name and value) for a text-formatted log message to the given buffer.voidlogSanitizedValueToJSONFormattedLog(Double value, JSONBuffer buffer) Appends a sanitized representation of the provided value (without a field name, as might be suitable for a value included in a JSON array) for a JSON-formatted log message to the given buffer.voidlogTokenizedComponentsFieldToJSONFormattedLog(String fieldName, Double fieldValue, byte[] pepper, JSONBuffer buffer) Appends a representation of the specified field (both field name and value) with tokenized value components for a JSON-formatted log message to the given buffer.voidlogTokenizedComponentsFieldToTextFormattedLog(String fieldName, Double fieldValue, byte[] pepper, ByteStringBuffer buffer) Appends a representation of the specified field (both field name and value) with tokenized value components for a text-formatted log message to the given buffer.voidlogTokenizedComponentsValueToJSONFormattedLog(Double value, byte[] pepper, JSONBuffer buffer) Appends a representation of the provided value (without a field name, as might be suitable for a value included in a JSON array) with tokenized value components for a JSON-formatted log message to the given buffer.parseValue(String valueString) Attempts to parse the provided string as a value in accordance with this syntax.voidredactEntireValue(ByteStringBuffer buffer) Appends a string representation of a redacted entire value to the provided buffer.booleanIndicates whether this syntax supports redacting individual components of the entire value.booleanIndicates whether this syntax supports tokenizing individual components of the entire value.voidtokenizeEntireValue(Double value, byte[] pepper, ByteStringBuffer buffer) Appends a tokenized representation of the provided value to the given buffer.booleanvalueStringIncludesRedactedComponent(String valueString) Determines whether the provided value string represents a value that has had one or more components redacted.booleanvalueStringIncludesTokenizedComponent(String valueString) Determines whether the provided value string represents a value that has had one or more components tokenized.booleanvalueStringIsCompletelyRedacted(String valueString) Determines whether the provided value string represents a value that has been completely redacted.booleanvalueStringIsCompletelyTokenized(String valueString) Determines whether the provided value string represents a value that has been completely tokenized.voidvalueToSanitizedString(double value, ByteStringBuffer buffer) Appends a sanitized string representation of the provided double to the given buffer.voidvalueToSanitizedString(float value, ByteStringBuffer buffer) Appends a sanitized string representation of the provided float to the given buffer.voidvalueToSanitizedString(Double value, ByteStringBuffer buffer) Encodes the provided value to a sanitized string representation suitable for inclusion in a log message.booleanIndicates whether values with one or more redacted components still conform to this syntax.booleanIndicates whether values with one or more tokenized components still conform to this syntax.Methods inherited from class com.unboundid.ldap.sdk.unboundidds.logs.v2.syntax.LogFieldSyntax
getMaxStringLengthCharacters, getTemporaryBuffer, redactComponents, redactComponents, redactEntireValue, releaseTemporaryBuffer, sanitize, sanitize, sha256, tokenize, tokenize, tokenize, tokenizeComponents, tokenizeComponents, tokenizeEntireValue, valueToSanitizedString
-
Field Details
-
SYNTAX_NAME
The name for this syntax.- See Also:
-
-
Method Details
-
getInstance
Retrieves a singleton instance of this log field syntax.- Returns:
- A singleton instance of this log field syntax.
-
getSyntaxName
Retrieves the name for this syntax.- Specified by:
getSyntaxNamein classLogFieldSyntax<Double>- Returns:
- The name for this syntax.
-
valueToSanitizedString
Appends a sanitized string representation of the provided float to the given buffer.- Parameters:
value- The value to be appended.buffer- The buffer to which the string representation should be appended. It must not benull.
-
valueToSanitizedString
Appends a sanitized string representation of the provided double to the given buffer.- Parameters:
value- The value to be appended.buffer- The buffer to which the string representation should be appended. It must not benull.
-
valueToSanitizedString
Encodes the provided value to a sanitized string representation suitable for inclusion in a log message. The sanitized string should at least be cleaned of control characters and other non-printable characters, but depending on the syntax, it may clean other characters as well.- Specified by:
valueToSanitizedStringin classLogFieldSyntax<Double>- Parameters:
value- The value to be encoded. It must not benull.buffer- The buffer to which the string representation should be appended. It must not benull.
-
logSanitizedFieldToTextFormattedLog
public void logSanitizedFieldToTextFormattedLog(@NotNull String fieldName, @NotNull Double fieldValue, @NotNull ByteStringBuffer buffer) Appends a sanitized representation of the specified field (both field name and value) for a text-formatted log message to the given buffer.- Specified by:
logSanitizedFieldToTextFormattedLogin classLogFieldSyntax<Double>- Parameters:
fieldName- The name for the field. It must not benull.fieldValue- The value to use for the field. It must not benull.buffer- The buffer to which the sanitized log field should be appended. It must not benull.
-
logSanitizedFieldToJSONFormattedLog
public void logSanitizedFieldToJSONFormattedLog(@NotNull String fieldName, @NotNull Double fieldValue, @NotNull JSONBuffer buffer) Appends a sanitized representation of the specified field (both field name and value) for a JSON-formatted log message to the given buffer.- Specified by:
logSanitizedFieldToJSONFormattedLogin classLogFieldSyntax<Double>- Parameters:
fieldName- The name for the field. It must not benull.fieldValue- The value to use for the field. It must not benull.buffer- The buffer to which the sanitized log field should be appended. It must not benull.
-
logSanitizedValueToJSONFormattedLog
Appends a sanitized representation of the provided value (without a field name, as might be suitable for a value included in a JSON array) for a JSON-formatted log message to the given buffer.- Specified by:
logSanitizedValueToJSONFormattedLogin classLogFieldSyntax<Double>- Parameters:
value- The value to be appended to the buffer. It must not benull.buffer- The buffer to which the sanitized value should be appended. It must not benull.
-
parseValue
@NotNull public Double parseValue(@NotNull String valueString) throws RedactedValueException, TokenizedValueException, LogSyntaxException Attempts to parse the provided string as a value in accordance with this syntax.- Specified by:
parseValuein classLogFieldSyntax<Double>- Parameters:
valueString- The string to be parsed.- Returns:
- The value that was parsed.
- Throws:
RedactedValueException- If the provided value has been redacted (either the complete value or one or more of its components), and the redacted form cannot be represented in this syntax.TokenizedValueException- If the provided value has been tokenized (either the complete value or one or more of its components), and the redacted form cannot be represented in this syntax.LogSyntaxException- If the provided value cannot be parsed in accordance with this syntax.
-
valueStringIsCompletelyRedacted
Determines whether the provided value string represents a value that has been completely redacted.- Overrides:
valueStringIsCompletelyRedactedin classLogFieldSyntax<Double>- Parameters:
valueString- The value for which to make the determination. It must not benull.- Returns:
trueif the provided value string represents a value that has been completely redacted, orfalseif not.
-
completelyRedactedValueConformsToSyntax
Indicates whether values that have been completely redacted still conform to this syntax.- Specified by:
completelyRedactedValueConformsToSyntaxin classLogFieldSyntax<Double>- Returns:
trueif values that have been completely redacted still conform to this syntax, orfalseif not.
-
redactEntireValue
Appends a string representation of a redacted entire value to the provided buffer.- Overrides:
redactEntireValuein classLogFieldSyntax<Double>- Parameters:
buffer- The buffer to which the redacted string representation should be appended. It must not benull.
-
logCompletelyRedactedFieldToTextFormattedLog
public void logCompletelyRedactedFieldToTextFormattedLog(@NotNull String fieldName, @NotNull ByteStringBuffer buffer) Appends a completely redacted representation of the specified field (both field name and value) for a text-formatted log message to the given buffer.- Specified by:
logCompletelyRedactedFieldToTextFormattedLogin classLogFieldSyntax<Double>- Parameters:
fieldName- The name for the field. It must not benull.buffer- The buffer to which the sanitized log field should be appended. It must not benull.
-
logCompletelyRedactedFieldToJSONFormattedLog
public void logCompletelyRedactedFieldToJSONFormattedLog(@NotNull String fieldName, @NotNull JSONBuffer buffer) Appends a completely redacted representation of the specified field (both field name and value) for a JSON-formatted log message to the given buffer.- Specified by:
logCompletelyRedactedFieldToJSONFormattedLogin classLogFieldSyntax<Double>- Parameters:
fieldName- The name for the field. It must not benull.buffer- The buffer to which the sanitized log field should be appended. It must not benull.
-
logCompletelyRedactedValueToJSONFormattedLog
Appends a completely redacted representation of a value (without a field name, as might be suitable for a value included in a JSON array) for a JSON-formatted log message to the given buffer.- Specified by:
logCompletelyRedactedValueToJSONFormattedLogin classLogFieldSyntax<Double>- Parameters:
buffer- The buffer to which the redacted value should be appended. It must not benull.
-
supportsRedactedComponents
Indicates whether this syntax supports redacting individual components of the entire value.- Specified by:
supportsRedactedComponentsin classLogFieldSyntax<Double>- Returns:
trueif this syntax supports redacting individual components of the entire value, orfalseif not.
-
valueStringIncludesRedactedComponent
Determines whether the provided value string represents a value that has had one or more components redacted.- Overrides:
valueStringIncludesRedactedComponentin classLogFieldSyntax<Double>- Parameters:
valueString- The value for which to make the determination. It must not benull.- Returns:
trueif the provided value string represents a value that has had one or more components redacted, orfalseif not.
-
valueWithRedactedComponentsConformsToSyntax
Indicates whether values with one or more redacted components still conform to this syntax.- Specified by:
valueWithRedactedComponentsConformsToSyntaxin classLogFieldSyntax<Double>- Returns:
trueif values with one or more redacted components still conform to this syntax.
-
logRedactedComponentsFieldToTextFormattedLog
public void logRedactedComponentsFieldToTextFormattedLog(@NotNull String fieldName, @NotNull Double fieldValue, @NotNull ByteStringBuffer buffer) Appends a representation of the specified field (both field name and value) with redacted value components for a text-formatted log message to the given buffer. If this syntax does not support redacting components within a value, then it should redact the entire value.- Specified by:
logRedactedComponentsFieldToTextFormattedLogin classLogFieldSyntax<Double>- Parameters:
fieldName- The name for the field. It must not benull.fieldValue- The value to use for the field. It must not benull.buffer- The buffer to which the sanitized log field should be appended. It must not benull.
-
logRedactedComponentsFieldToJSONFormattedLog
public void logRedactedComponentsFieldToJSONFormattedLog(@NotNull String fieldName, @NotNull Double fieldValue, @NotNull JSONBuffer buffer) Appends a representation of the specified field (both field name and value) with redacted value components for a JSON-formatted log message to the given buffer. If this syntax does not support redacting components within a value, then it should redact the entire value.- Specified by:
logRedactedComponentsFieldToJSONFormattedLogin classLogFieldSyntax<Double>- Parameters:
fieldName- The name for the field. It must not benull.fieldValue- The value to use for the field. It must not benull.buffer- The buffer to which the sanitized log field should be appended. It must not benull.
-
logRedactedComponentsValueToJSONFormattedLog
public void logRedactedComponentsValueToJSONFormattedLog(@NotNull Double value, @NotNull JSONBuffer buffer) Appends a representation of the provided value (without a field name, as might be suitable for a value included in a JSON array) with redacted components for a JSON-formatted log message to the given buffer. If this syntax does not support redacting components within a value, then it should redact the entire value.- Specified by:
logRedactedComponentsValueToJSONFormattedLogin classLogFieldSyntax<Double>- Parameters:
value- The value to be appended to the buffer in redacted form. It must not benull.buffer- The buffer to which the redacted value should be appended. It must not benull.
-
valueStringIsCompletelyTokenized
Determines whether the provided value string represents a value that has been completely tokenized.- Overrides:
valueStringIsCompletelyTokenizedin classLogFieldSyntax<Double>- Parameters:
valueString- The value for which to make the determination. It must not benull.- Returns:
trueif the provided value string represents a value that has been completely tokenized, orfalseif not.
-
completelyTokenizedValueConformsToSyntax
Indicates whether values that have been completely tokenized still conform to this syntax.- Specified by:
completelyTokenizedValueConformsToSyntaxin classLogFieldSyntax<Double>- Returns:
trueif values that have been completely tokenized still conform to this syntax, orfalseif not.
-
tokenizeEntireValue
public void tokenizeEntireValue(@NotNull Double value, @NotNull byte[] pepper, @NotNull ByteStringBuffer buffer) Appends a tokenized representation of the provided value to the given buffer.
The resulting token will protect the provided value by representing it in a way that makes it at infeasible to determine what the original value was. However, tokenizing the same value with the same pepper should consistently yield the same token value, so that it will be possible to identify the same value across multiple log messages.- Specified by:
tokenizeEntireValuein classLogFieldSyntax<Double>- Parameters:
value- The value for which to generate the token. It must not benull.pepper- A pepper used to provide brute-force protection for the resulting token. The pepper value should be kept secret so that it is not available to unauthorized users who might be able to view log information, although the same pepper value should be consistently provided when tokenizing values so that the same value will consistently yield the same token. It must not benulland should not be empty.buffer- The buffer to which the tokenized representation should be appended. It must not benull.
-
logCompletelyTokenizedFieldToTextFormattedLog
public void logCompletelyTokenizedFieldToTextFormattedLog(@NotNull String fieldName, @NotNull Double fieldValue, @NotNull byte[] pepper, @NotNull ByteStringBuffer buffer) Appends a completely tokenized representation of the specified field (both field name and value) for a text-formatted log message to the given buffer.- Specified by:
logCompletelyTokenizedFieldToTextFormattedLogin classLogFieldSyntax<Double>- Parameters:
fieldName- The name for the field. It must not benull.fieldValue- The value to use for the field. It must not benull.pepper- A pepper used to provide brute-force protection for the resulting token. The pepper value should be kept secret so that it is not available to unauthorized users who might be able to view log information, although the same pepper value should be consistently provided when tokenizing values so that the same value will consistently yield the same token. It must not benulland should not be empty.buffer- The buffer to which the sanitized log field should be appended. It must not benull.
-
logCompletelyTokenizedFieldToJSONFormattedLog
public void logCompletelyTokenizedFieldToJSONFormattedLog(@NotNull String fieldName, @NotNull Double fieldValue, @NotNull byte[] pepper, @NotNull JSONBuffer buffer) Appends a completely tokenized representation of the specified field (both field name and value) for a JSON-formatted log message to the given buffer.- Specified by:
logCompletelyTokenizedFieldToJSONFormattedLogin classLogFieldSyntax<Double>- Parameters:
fieldName- The name for the field. It must not benull.fieldValue- The value to use for the field. It must not benull.pepper- A pepper used to provide brute-force protection for the resulting token. The pepper value should be kept secret so that it is not available to unauthorized users who might be able to view log information, although the same pepper value should be consistently provided when tokenizing values so that the same value will consistently yield the same token. It must not benulland should not be empty.buffer- The buffer to which the sanitized log field should be appended. It must not benull.
-
logCompletelyTokenizedValueToJSONFormattedLog
public void logCompletelyTokenizedValueToJSONFormattedLog(@NotNull Double value, @NotNull byte[] pepper, @NotNull JSONBuffer buffer) Appends a completely tokenized representation of the provided value (without a field name, as might be suitable for a value included in a JSON array) for a JSON-formatted log message to the given buffer.- Specified by:
logCompletelyTokenizedValueToJSONFormattedLogin classLogFieldSyntax<Double>- Parameters:
value- The value to be appended to the buffer in tokenized form. It must not benull.pepper- A pepper used to provide brute-force protection for the resulting token. The pepper value should be kept secret so that it is not available to unauthorized users who might be able to view log information, although the same pepper value should be consistently provided when tokenizing values so that the same value will consistently yield the same token. It must not benulland should not be empty.buffer- The buffer to which the tokenized value should be appended. It must not benull.
-
supportsTokenizedComponents
Indicates whether this syntax supports tokenizing individual components of the entire value.- Specified by:
supportsTokenizedComponentsin classLogFieldSyntax<Double>- Returns:
trueif this syntax supports tokenizing individual components of the entire value, orfalseif not.
-
valueStringIncludesTokenizedComponent
Determines whether the provided value string represents a value that has had one or more components tokenized.- Overrides:
valueStringIncludesTokenizedComponentin classLogFieldSyntax<Double>- Parameters:
valueString- The value for which to make the determination. It must not benull.- Returns:
trueif the provided value string represents a value that has had one or more components tokenized, orfalseif not.
-
valueWithTokenizedComponentsConformsToSyntax
Indicates whether values with one or more tokenized components still conform to this syntax.- Specified by:
valueWithTokenizedComponentsConformsToSyntaxin classLogFieldSyntax<Double>- Returns:
trueif values with one or more tokenized components still conform to this syntax.
-
logTokenizedComponentsFieldToTextFormattedLog
public void logTokenizedComponentsFieldToTextFormattedLog(@NotNull String fieldName, @NotNull Double fieldValue, @NotNull byte[] pepper, @NotNull ByteStringBuffer buffer) Appends a representation of the specified field (both field name and value) with tokenized value components for a text-formatted log message to the given buffer. If this syntax does not support tokenizing components within a value, then it should tokenize the entire value.- Specified by:
logTokenizedComponentsFieldToTextFormattedLogin classLogFieldSyntax<Double>- Parameters:
fieldName- The name for the field. It must not benull.fieldValue- The value to use for the field. It must not benull.pepper- A pepper used to provide brute-force protection for the resulting token. The pepper value should be kept secret so that it is not available to unauthorized users who might be able to view log information, although the same pepper value should be consistently provided when tokenizing values so that the same value will consistently yield the same token. It must not benulland should not be empty.buffer- The buffer to which the sanitized log field should be appended. It must not benull.
-
logTokenizedComponentsFieldToJSONFormattedLog
public void logTokenizedComponentsFieldToJSONFormattedLog(@NotNull String fieldName, @NotNull Double fieldValue, @NotNull byte[] pepper, @NotNull JSONBuffer buffer) Appends a representation of the specified field (both field name and value) with tokenized value components for a JSON-formatted log message to the given buffer. If this syntax does not support tokenizing components within a value, then it should tokenize the entire value.- Specified by:
logTokenizedComponentsFieldToJSONFormattedLogin classLogFieldSyntax<Double>- Parameters:
fieldName- The name for the field. It must not benull.fieldValue- The value to use for the field. It must not benull.pepper- A pepper used to provide brute-force protection for the resulting token. The pepper value should be kept secret so that it is not available to unauthorized users who might be able to view log information, although the same pepper value should be consistently provided when tokenizing values so that the same value will consistently yield the same token. It must not benulland should not be empty.buffer- The buffer to which the sanitized log field should be appended. It must not benull.
-
logTokenizedComponentsValueToJSONFormattedLog
public void logTokenizedComponentsValueToJSONFormattedLog(@NotNull Double value, @NotNull byte[] pepper, @NotNull JSONBuffer buffer) Appends a representation of the provided value (without a field name, as might be suitable for a value included in a JSON array) with tokenized value components for a JSON-formatted log message to the given buffer. If this syntax does not support tokenizing components within a value, then it should tokenize the entire value.- Specified by:
logTokenizedComponentsValueToJSONFormattedLogin classLogFieldSyntax<Double>- Parameters:
value- The value to be appended to the buffer in tokenized form. It must not benull.pepper- A pepper used to provide brute-force protection for the resulting token. The pepper value should be kept secret so that it is not available to unauthorized users who might be able to view log information, although the same pepper value should be consistently provided when tokenizing values so that the same value will consistently yield the same token. It must not benulland should not be empty.buffer- The buffer to which the tokenized value should be appended. It must not benull.
-