Interface MetadataExtractorRegistry
- All Known Implementing Classes:
 DefaultMetadataExtractor
public interface MetadataExtractorRegistry
Stores registrations of extractors for metadata entries.
Each metadata entry is decoded based on its 
MimeType and a name
is assigned to the decoded value.- Since:
 - 5.2
 - Author:
 - Rossen Stoyanchev, Brian Clozel
 - See Also:
 
- 
Method Summary
Modifier and TypeMethodDescriptiondefault voidmetadataToExtract(MimeType mimeType, Class<?> targetType, @Nullable String name) Decode metadata entries with the givenMimeTypeto the specified target class, and store the decoded value in the output map under the given name.<T> voidmetadataToExtract(MimeType mimeType, Class<T> targetType, BiConsumer<T, Map<String, Object>> mapper) Variant ofmetadataToExtract(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 voidmetadataToExtract(MimeType mimeType, ParameterizedTypeReference<?> targetType, @Nullable String name) Variant ofmetadataToExtract(MimeType, Class, String)that acceptsParameterizedTypeReferenceinstead ofClassfor specifying a target type with generic parameters.<T> voidmetadataToExtract(MimeType mimeType, ParameterizedTypeReference<T> type, BiConsumer<T, Map<String, Object>> mapper) Variant ofmetadataToExtract(MimeType, Class, BiConsumer)that acceptsParameterizedTypeReferenceinstead ofClassfor specifying a target type with generic parameters. 
- 
Method Details
- 
metadataToExtract
Decode metadata entries with the givenMimeTypeto the specified target class, and store the decoded value in the output map under the given name.- Parameters:
 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 key
 - 
metadataToExtract
default void metadataToExtract(MimeType mimeType, ParameterizedTypeReference<?> targetType, @Nullable String name) Variant ofmetadataToExtract(MimeType, Class, String)that acceptsParameterizedTypeReferenceinstead ofClassfor specifying a target type with generic parameters.- Parameters:
 mimeType- the mime type of metadata entries to extracttargetType- the target value type to decode to
 - 
metadataToExtract
<T> void metadataToExtract(MimeType mimeType, Class<T> targetType, BiConsumer<T, Map<String, Object>> mapper) Variant ofmetadataToExtract(MimeType, Class, String)that allows custom logic to be used to map the decoded value to any number of values in the output map.- Type Parameters:
 T- the target value type- Parameters:
 mimeType- 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
 - 
metadataToExtract
<T> void metadataToExtract(MimeType mimeType, ParameterizedTypeReference<T> type, BiConsumer<T, Map<String, Object>> mapper) Variant ofmetadataToExtract(MimeType, Class, BiConsumer)that acceptsParameterizedTypeReferenceinstead ofClassfor specifying a target type with generic parameters.- Type Parameters:
 T- the target value type- Parameters:
 mimeType- 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
 
 -