com.atlassian.confluence.search.lucene.tasks
Class AddChangeDocumentIndexTask

java.lang.Object
  extended by com.atlassian.confluence.search.lucene.tasks.AddChangeDocumentIndexTask
All Implemented Interfaces:
com.atlassian.bonnie.ILuceneConnection.WriterAction, HandleAware, IndexTask, ConfluenceIndexTask

public class AddChangeDocumentIndexTask
extends Object
implements ConfluenceIndexTask, HandleAware

Responsible for removing and adding a change document for versioned content to the index. Enforces a maximum of one change document per user per piece of current content.


Constructor Summary
AddChangeDocumentIndexTask(com.atlassian.bonnie.Searchable searchable, com.atlassian.bonnie.search.DocumentBuilder changeDocumentBuilder)
           
 
Method Summary
 boolean equals(Object obj)
           
 String getDescription()
          A description of the task that can be presented to the user via the UI.
 com.atlassian.bonnie.Handle getHandle()
           
 int hashCode()
           
 void perform(org.apache.lucene.index.IndexWriter writer)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AddChangeDocumentIndexTask

public AddChangeDocumentIndexTask(com.atlassian.bonnie.Searchable searchable,
                                  com.atlassian.bonnie.search.DocumentBuilder changeDocumentBuilder)
Parameters:
searchable - a Versioned searchable
changeDocumentBuilder - instance of ChangeDocumentBuilder
Throws:
IllegalArgumentException - if searchable is invalid.
Method Detail

getHandle

public com.atlassian.bonnie.Handle getHandle()
Specified by:
getHandle in interface HandleAware
Returns:
the handle

getDescription

public String getDescription()
Description copied from interface: IndexTask
A description of the task that can be presented to the user via the UI.

Specified by:
getDescription in interface IndexTask
Returns:
an readable message.

perform

public void perform(org.apache.lucene.index.IndexWriter writer)
             throws IOException
Specified by:
perform in interface com.atlassian.bonnie.ILuceneConnection.WriterAction
Throws:
IOException

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2003–2015 Atlassian. All rights reserved.