Class DefaultAttachmentExtractedTextManager
- java.lang.Object
-
- com.atlassian.confluence.internal.index.attachment.DefaultAttachmentExtractedTextManager
-
- All Implemented Interfaces:
AttachmentExtractedTextManager
public class DefaultAttachmentExtractedTextManager extends Object implements AttachmentExtractedTextManager
Note that as extracted text is stored in the filesystem in compression format, changingDataCompressor
will require the migration of extracted text into new compression format.- Since:
- 6.5
-
-
Constructor Summary
Constructors Constructor Description DefaultAttachmentExtractedTextManager(AttachmentManager attachmentManager, DataCompressor compressor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<InputStreamSource>
getContent(Attachment attachment)
Returns anOptional
describing theInputStreamSource
of extracted text of the provided attachment version if it is available, or an emptyOptional
otherwise.void
removeContent(Attachment attachment)
Remove extracted text of the specified attachment version.void
removePreviousVersionContent(Attachment attachment)
Remove extracted text of the previous version of the specified attachment version if it exists.void
saveContent(Attachment attachment, InputStreamSource inputStreamSource)
Saves a stream of data as the extracted text of the provided attachment version.
-
-
-
Constructor Detail
-
DefaultAttachmentExtractedTextManager
public DefaultAttachmentExtractedTextManager(AttachmentManager attachmentManager, DataCompressor compressor)
-
-
Method Detail
-
getContent
public Optional<InputStreamSource> getContent(Attachment attachment)
Description copied from interface:AttachmentExtractedTextManager
Returns anOptional
describing theInputStreamSource
of extracted text of the provided attachment version if it is available, or an emptyOptional
otherwise.- Specified by:
getContent
in interfaceAttachmentExtractedTextManager
-
saveContent
public void saveContent(Attachment attachment, InputStreamSource inputStreamSource)
Description copied from interface:AttachmentExtractedTextManager
Saves a stream of data as the extracted text of the provided attachment version.- Specified by:
saveContent
in interfaceAttachmentExtractedTextManager
-
removePreviousVersionContent
public void removePreviousVersionContent(Attachment attachment)
Description copied from interface:AttachmentExtractedTextManager
Remove extracted text of the previous version of the specified attachment version if it exists.- Specified by:
removePreviousVersionContent
in interfaceAttachmentExtractedTextManager
-
removeContent
public void removeContent(Attachment attachment)
Description copied from interface:AttachmentExtractedTextManager
Remove extracted text of the specified attachment version.- Specified by:
removeContent
in interfaceAttachmentExtractedTextManager
-
-