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
Constructors Constructor Description AttachmentTextExtractionFunction(AttachmentDao attachmentDao, AttachmentExtractedTextManager attachmentExtractedTextManager, DelegatingAttachmentTextExtractor delegatingAttachmentTextExtractor, Supplier<Boolean> shouldCompressTextExtraction)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AttachmentTextExtraction
apply(Long attachmentId, Integer version)
Returns emptyAttachmentTextExtraction
if 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, wait
-
Methods inherited from interface java.util.function.BiFunction
andThen
-
-
-
-
Constructor Detail
-
AttachmentTextExtractionFunction
public AttachmentTextExtractionFunction(AttachmentDao attachmentDao, AttachmentExtractedTextManager attachmentExtractedTextManager, DelegatingAttachmentTextExtractor delegatingAttachmentTextExtractor, Supplier<Boolean> shouldCompressTextExtraction)
-
-
Method Detail
-
apply
@Transactional(propagation=REQUIRES_NEW) public AttachmentTextExtraction apply(Long attachmentId, Integer version)
Returns emptyAttachmentTextExtraction
if an attachment has been removed or has been updated into a new version. Otherwise returns result of attachment text extraction.- Specified by:
apply
in interfaceBiFunction<Long,Integer,AttachmentTextExtraction>
-
-