@ConsumerType
public interface SlingScalarConverter<T,X>
NAME_SERVICE_PROPERTY
service property which is the name of the scalar type.| Modifier and Type | Field and Description |
|---|---|
static String |
NAME_SERVICE_PROPERTY |
| Modifier and Type | Method and Description |
|---|---|
T |
parseValue(X input)
Parse an external value (a query argument for example) into its internal representation
|
X |
serialize(T value)
Serialize an internal value (provided by a
SlingDataFetcher into its
external representation. |
static final String NAME_SERVICE_PROPERTY
@Nullable T parseValue(@Nullable X input) throws ScalarConversionException
input - the external value to parseScalarConversionException - if the parsing operation fails@Nullable X serialize(@Nullable T value) throws ScalarConversionException
SlingDataFetcher into its
external representation.value - the internal valueScalarConversionException - if the serialization operation failsCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.