Class AttachmentTextExtractionFunction
java.lang.Object
com.atlassian.confluence.internal.index.attachment.AttachmentTextExtractionFunction
- All Implemented Interfaces:
BiFunction<Long,Integer, AttachmentTextExtraction>
public class AttachmentTextExtractionFunction
extends Object
implements BiFunction<Long,Integer,AttachmentTextExtraction>
A function that enables transaction demarcation around attachment text extraction.
- Since:
- 6.5
-
Constructor Summary
ConstructorsConstructorDescriptionAttachmentTextExtractionFunction(AttachmentDao attachmentDao, AttachmentExtractedTextManager attachmentExtractedTextManager, DelegatingAttachmentTextExtractor delegatingAttachmentTextExtractor, Supplier<Boolean> shouldCompressTextExtraction) -
Method Summary
Modifier and TypeMethodDescriptionReturns emptyAttachmentTextExtractionif an attachment has been removed or has been updated into a new version.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.function.BiFunction
andThen
-
Constructor Details
-
AttachmentTextExtractionFunction
public AttachmentTextExtractionFunction(AttachmentDao attachmentDao, AttachmentExtractedTextManager attachmentExtractedTextManager, DelegatingAttachmentTextExtractor delegatingAttachmentTextExtractor, Supplier<Boolean> shouldCompressTextExtraction)
-
-
Method Details
-
apply
@Transactional(propagation=REQUIRES_NEW) public AttachmentTextExtraction apply(Long attachmentId, Integer version) Returns emptyAttachmentTextExtractionif an attachment has been removed or has been updated into a new version. Otherwise returns result of attachment text extraction.- Specified by:
applyin interfaceBiFunction<Long,Integer, AttachmentTextExtraction>
-