Class AddChangeDocumentIndexTask
- java.lang.Object
- 
- com.atlassian.confluence.internal.search.tasks.AddChangeDocumentIndexTask
 
- 
- All Implemented Interfaces:
- ConfluenceIndexTask,- ConvertibleToJournalEntry,- HandleAware,- IndexTask
 
 @LuceneIndependent @Internal public class AddChangeDocumentIndexTask extends Object implements ConfluenceIndexTask, HandleAware Responsible for removing and adding a change document for versioned content to the change index. Enforces a maximum of one change document per user per piece of current content.
- 
- 
Constructor SummaryConstructors Constructor Description AddChangeDocumentIndexTask(Searchable searchable, AtlassianDocumentBuilder<Searchable> changeDocumentBuilder)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<JournalEntry>convertToJournalEntry(JournalIdentifier journalId)Convert to journal entry.booleanequals(Object obj)StringgetDescription()A description of the task that can be presented to the user via the UI.HandlegetHandle()SearchIndexgetSearchIndex()inthashCode()voidperform(SearchIndexWriter writer)Executes this task against a document writer.StringtoString()
 
- 
- 
- 
Constructor Detail- 
AddChangeDocumentIndexTaskpublic AddChangeDocumentIndexTask(Searchable searchable, AtlassianDocumentBuilder<Searchable> changeDocumentBuilder) - Parameters:
- searchable- a- Versionedsearchable
- changeDocumentBuilder- instance of- LuceneDocumentBuilder
- Throws:
- IllegalArgumentException- if searchable is invalid.
 
 
- 
 - 
Method Detail- 
getHandlepublic Handle getHandle() - Specified by:
- getHandlein interface- HandleAware
- Returns:
- the handle
 
 - 
getDescriptionpublic String getDescription() Description copied from interface:IndexTaskA description of the task that can be presented to the user via the UI.- Specified by:
- getDescriptionin interface- IndexTask
- Returns:
- an readable message.
 
 - 
performpublic void perform(SearchIndexWriter writer) throws IOException Description copied from interface:ConfluenceIndexTaskExecutes this task against a document writer.- Specified by:
- performin interface- ConfluenceIndexTask
- Throws:
- IOException
 
 - 
convertToJournalEntrypublic Optional<JournalEntry> convertToJournalEntry(JournalIdentifier journalId) Description copied from interface:ConvertibleToJournalEntryConvert to journal entry.- Specified by:
- convertToJournalEntryin interface- ConvertibleToJournalEntry
- Parameters:
- journalId- journal identifier
- Returns:
- an optional containing a journal entry or empty if this cannot be converted.
 
 - 
getSearchIndexpublic SearchIndex getSearchIndex() - Specified by:
- getSearchIndexin interface- ConfluenceIndexTask
- Returns:
- the SearchIndexthat the task should write to
 
 
- 
 
-