public final class SimpleAttributeMapper extends AttributeMapper
Modifier and Type | Method and Description |
---|---|
SimpleAttributeMapper |
decoder(org.forgerock.util.Function<org.forgerock.opendj.ldap.ByteString,?,org.forgerock.util.promise.NeverThrowsException> f)
Sets the decoder which will be used for converting LDAP attribute values
to JSON values.
|
SimpleAttributeMapper |
defaultJSONValue(Object defaultValue)
Sets the default JSON value which should be substituted when the LDAP
attribute is not found in the LDAP entry.
|
SimpleAttributeMapper |
encoder(org.forgerock.util.Function<Object,org.forgerock.opendj.ldap.ByteString,org.forgerock.util.promise.NeverThrowsException> f)
Sets the encoder which will be used for converting JSON values to LDAP
attribute values.
|
SimpleAttributeMapper |
isBinary()
Indicates that JSON values are base 64 encodings of binary data.
|
T |
isRequired()
Indicates that the LDAP attribute is mandatory and must be provided
during create requests.
|
T |
isSingleValued()
Indicates that multi-valued LDAP attribute should be represented as a
single-valued JSON value, rather than an array of values.
|
String |
toString() |
T |
writability(WritabilityPolicy policy)
Indicates whether or not the LDAP attribute supports updates.
|
public SimpleAttributeMapper decoder(org.forgerock.util.Function<org.forgerock.opendj.ldap.ByteString,?,org.forgerock.util.promise.NeverThrowsException> f)
f
- The function to use for decoding LDAP attribute values.public SimpleAttributeMapper defaultJSONValue(Object defaultValue)
defaultValue
- The default JSON value.public SimpleAttributeMapper encoder(org.forgerock.util.Function<Object,org.forgerock.opendj.ldap.ByteString,org.forgerock.util.promise.NeverThrowsException> f)
f
- The function to use for encoding LDAP attribute values.public SimpleAttributeMapper isBinary()
mapper.decoder(...); // function that converts binary data to base 64 mapper.encoder(...); // function that converts base 64 to binary data
public final T isRequired()
public final T isSingleValued()
public final T writability(WritabilityPolicy policy)
WritabilityPolicy.READ_WRITE
.policy
- The writability policy.Copyright © 2011-2015 ForgeRock AS. All Rights Reserved.