public final class SimplePropertyMapper extends PropertyMapper
Modifier and Type | Method and Description |
---|---|
SimplePropertyMapper |
decoder(Function<ByteString,?,NeverThrowsException> f)
Sets the decoder which will be used for converting LDAP attribute values
to JSON values.
|
SimplePropertyMapper |
defaultJsonValue(Object defaultValue)
Sets the default JSON value which should be substituted when the LDAP attribute is not found in the LDAP entry.
|
SimplePropertyMapper |
defaultJsonValues(Collection<?> defaultValues)
Sets the default JSON values which should be substituted when the LDAP attribute is not found in the LDAP entry.
|
SimplePropertyMapper |
encoder(Function<Object,ByteString,NeverThrowsException> f)
Sets the encoder which will be used for converting JSON values to LDAP
attribute values.
|
SimplePropertyMapper |
isBinary(boolean isBinary)
Indicates that JSON values are base 64 encodings of binary data.
|
T |
isMultiValued(boolean isMultiValued)
Indicates that the LDAP attribute is multi-valued and should be represented in JSON using an array of values.
|
T |
isRequired(boolean isRequired)
Indicates that the LDAP attribute is mandatory and must be provided during create requests.
|
String |
toString() |
T |
writability(WritabilityPolicy policy)
Indicates whether the LDAP attribute supports updates.
|
public SimplePropertyMapper decoder(Function<ByteString,?,NeverThrowsException> f)
f
- The function to use for decoding LDAP attribute values.public SimplePropertyMapper defaultJsonValue(Object defaultValue)
defaultValue
- The default JSON value.public SimplePropertyMapper defaultJsonValues(Collection<?> defaultValues)
defaultValues
- The default JSON values.public SimplePropertyMapper encoder(Function<Object,ByteString,NeverThrowsException> f)
f
- The function to use for encoding LDAP attribute values.public SimplePropertyMapper isBinary(boolean isBinary)
true
is equivalent to the following:
mapper.decoder(...); // function that converts binary data to base 64 mapper.encoder(...); // function that converts base 64 to binary dataPassing in a value of
false
resets the encoding and decoding
functions to the default.isBinary
- true
if this property is binary.public final T isRequired(boolean isRequired)
isRequired
- true
if this property is required.public final T isMultiValued(boolean isMultiValued)
isMultiValued
- true
if this property is multi-valued.public final T writability(WritabilityPolicy policy)
WritabilityPolicy.READ_WRITE
.policy
- The writability policy.Copyright 2010-2017 ForgeRock AS.