Package org.ldaptive.transcode
Interface ValueTranscoder<T>
-
- Type Parameters:
T- type of value
- All Known Implementing Classes:
AbstractBinaryValueTranscoder,AbstractPrimitiveValueTranscoder,AbstractSchemaElementValueTranscoder,AbstractStringValueTranscoder,AttributeTypeValueTranscoder,BooleanValueTranscoder,ByteArrayValueTranscoder,CertificateValueTranscoder,CharArrayValueTranscoder,DeltaTimeValueTranscoder,DITContentRuleValueTranscoder,DITStructureRuleValueTranscoder,DoubleValueTranscoder,FileTimeValueTranscoder,FloatValueTranscoder,GeneralizedTimeValueTranscoder,IntegerValueTranscoder,LongValueTranscoder,MatchingRuleUseValueTranscoder,MatchingRuleValueTranscoder,NameFormValueTranscoder,ObjectClassValueTranscoder,ObjectValueTranscoder,ShortValueTranscoder,StringValueTranscoder,SyntaxValueTranscoder,UnicodePwdValueTranscoder,UUIDValueTranscoder
public interface ValueTranscoder<T>Interface for decoding and encoding custom types for ldap attribute values.- Author:
- Middleware Services
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description TdecodeBinaryValue(byte[] value)Decodes the supplied ldap attribute value into a custom type.default java.util.function.Function<byte[],T>decoder()Functional implementation.TdecodeStringValue(java.lang.String value)Decodes the supplied ldap attribute value into a custom type.byte[]encodeBinaryValue(T value)Encodes the supplied value into an ldap attribute value.default java.util.function.Function<T,byte[]>encoder()Functional implementation.java.lang.StringencodeStringValue(T value)Encodes the supplied value into an ldap attribute value.java.lang.Class<T>getType()Returns the type produced by this value transcoder.
-
-
-
Method Detail
-
decodeStringValue
T decodeStringValue(java.lang.String value)
Decodes the supplied ldap attribute value into a custom type.- Parameters:
value- to decode- Returns:
- decoded value
-
decodeBinaryValue
T decodeBinaryValue(byte[] value)
Decodes the supplied ldap attribute value into a custom type.- Parameters:
value- to decode- Returns:
- decoded value
-
encodeStringValue
java.lang.String encodeStringValue(T value)
Encodes the supplied value into an ldap attribute value.- Parameters:
value- to encode- Returns:
- encoded value
-
encodeBinaryValue
byte[] encodeBinaryValue(T value)
Encodes the supplied value into an ldap attribute value.- Parameters:
value- to encode- Returns:
- encoded value
-
getType
java.lang.Class<T> getType()
Returns the type produced by this value transcoder.- Returns:
- type produced by this value transcoder
-
decoder
default java.util.function.Function<byte[],T> decoder()
Functional implementation.- Returns:
- decoder function
-
encoder
default java.util.function.Function<T,byte[]> encoder()
Functional implementation.- Returns:
- encoder function
-
-