Class StubAttachmentTextExtractor
java.lang.Object
com.atlassian.confluence.internal.search.extractor2.StubAttachmentTextExtractor
- All Implemented Interfaces:
AttachmentTextExtractor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionextract(Attachment attachment) Extracts text from an attachment.Return list of file extensions that this extractor supports.Return list of mime types that this extractor supports.
-
Constructor Details
-
StubAttachmentTextExtractor
public StubAttachmentTextExtractor()
-
-
Method Details
-
getFileExtensions
Description copied from interface:AttachmentTextExtractorReturn list of file extensions that this extractor supports.- Specified by:
getFileExtensionsin interfaceAttachmentTextExtractor
-
getMimeTypes
Description copied from interface:AttachmentTextExtractorReturn list of mime types that this extractor supports.- Specified by:
getMimeTypesin interfaceAttachmentTextExtractor
-
extract
Description copied from interface:AttachmentTextExtractorExtracts text from an attachment. This method can throw aRuntimeExceptionto indicate unrecoverable state of the attachment. In case of recoverable error, it shall returnsOption.empty().- Specified by:
extractin interfaceAttachmentTextExtractor- Parameters:
attachment- attachment for extraction- Returns:
Optionaldescribing aInputStreamSourceof extracted text if succeeds otherwiseOption.empty()
-