public interface MetadataExtractorRegistry
MimeType
and a name
is assigned to the decoded value.MetadataExtractor
Modifier and Type | Method and Description |
---|---|
default void |
metadataToExtract(MimeType mimeType,
Class<?> targetType,
String name)
Decode metadata entries with the given
MimeType to the specified
target class, and store the decoded value in the output map under the
given name. |
<T> void |
metadataToExtract(MimeType mimeType,
Class<T> targetType,
BiConsumer<T,Map<String,Object>> mapper)
Variant of
metadataToExtract(MimeType, Class, String) that allows
custom logic to be used to map the decoded value to any number of values
in the output map. |
default void |
metadataToExtract(MimeType mimeType,
ParameterizedTypeReference<?> targetType,
String name)
Variant of
metadataToExtract(MimeType, Class, String) that accepts
ParameterizedTypeReference instead of Class for
specifying a target type with generic parameters. |
<T> void |
metadataToExtract(MimeType mimeType,
ParameterizedTypeReference<T> type,
BiConsumer<T,Map<String,Object>> mapper)
Variant of
metadataToExtract(MimeType, Class, BiConsumer) that
accepts ParameterizedTypeReference instead of Class for
specifying a target type with generic parameters. |
default void metadataToExtract(MimeType mimeType, Class<?> targetType, @Nullable String name)
MimeType
to the specified
target class, and store the decoded value in the output map under the
given name.mimeType
- the mime type of metadata entries to extracttargetType
- the target value type to decode toname
- assign a name for the decoded value; if not provided, then
the mime type is used as the keydefault void metadataToExtract(MimeType mimeType, ParameterizedTypeReference<?> targetType, @Nullable String name)
metadataToExtract(MimeType, Class, String)
that accepts
ParameterizedTypeReference
instead of Class
for
specifying a target type with generic parameters.mimeType
- the mime type of metadata entries to extracttargetType
- the target value type to decode to<T> void metadataToExtract(MimeType mimeType, Class<T> targetType, BiConsumer<T,Map<String,Object>> mapper)
metadataToExtract(MimeType, Class, String)
that allows
custom logic to be used to map the decoded value to any number of values
in the output map.T
- the target value typemimeType
- the mime type of metadata entries to extracttargetType
- the target value type to decode tomapper
- custom logic to add the decoded value to the output map<T> void metadataToExtract(MimeType mimeType, ParameterizedTypeReference<T> type, BiConsumer<T,Map<String,Object>> mapper)
metadataToExtract(MimeType, Class, BiConsumer)
that
accepts ParameterizedTypeReference
instead of Class
for
specifying a target type with generic parameters.T
- the target value typemimeType
- the mime type of metadata entries to extracttype
- the target value type to decode tomapper
- custom logic to add the decoded value to the output map