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:AttachmentTextExtractor
Return list of file extensions that this extractor supports.- Specified by:
getFileExtensions
in interfaceAttachmentTextExtractor
-
getMimeTypes
Description copied from interface:AttachmentTextExtractor
Return list of mime types that this extractor supports.- Specified by:
getMimeTypes
in interfaceAttachmentTextExtractor
-
extract
Description copied from interface:AttachmentTextExtractor
Extracts text from an attachment. This method can throw aRuntimeException
to indicate unrecoverable state of the attachment. In case of recoverable error, it shall returnsOption.empty()
.- Specified by:
extract
in interfaceAttachmentTextExtractor
- Parameters:
attachment
- attachment for extraction- Returns:
Optional
describing aInputStreamSource
of extracted text if succeeds otherwiseOption.empty()
-