Package org.apache.sling.cms
Interface FileMetadataExtractor
@ProviderType
public interface FileMetadataExtractor
Service for extracting metadata from a file
-
Method Summary
Modifier and TypeMethodDescriptionextractMetadata(File file) Extract the metadata from the specified file and return the resulting metadatavoidupdateMetadata(File file) Extract the metadata from the specified file and persist the results under the jcr:content/metadata node of the file resourcevoidupdateMetadata(File file, boolean persist) Extract the metadata from the specified file and persist the results under the jcr:content/metadata node of the file resource
-
Method Details
-
extractMetadata
Extract the metadata from the specified file and return the resulting metadata- Parameters:
file- the file from which to extract the metadata- Returns:
- the metadata from the file
- Throws:
IOException- an exception occurs extracting the metadata
-
updateMetadata
Extract the metadata from the specified file and persist the results under the jcr:content/metadata node of the file resource- Parameters:
file- the file to extract the metadata from- Throws:
IOException- an exception occurs updating the metadata
-
updateMetadata
Extract the metadata from the specified file and persist the results under the jcr:content/metadata node of the file resource- Parameters:
file- the file to extract the metadata frompersist- if true, persist the results, if not leave the changes unpersisted- Throws:
IOException- an exception occurs updating the metadata
-