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

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

public class RebuildChangeDocumentsIndexTask
extends Object
implements ConfluenceIndexTask, HandleAware

Responsible for rebuilding all change document(s) for a searchable (removing change documents for all versions of the searchable and then adding them back).


Constructor Summary
RebuildChangeDocumentsIndexTask(com.atlassian.bonnie.Searchable searchable, ContentEntityObjectDao contentEntityObjectDao, AttachmentManager attachmentManager, IndexTaskFactory indexTaskFactory)
          Constructs a rebuild change document index task.
 
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)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RebuildChangeDocumentsIndexTask

public RebuildChangeDocumentsIndexTask(com.atlassian.bonnie.Searchable searchable,
                                       ContentEntityObjectDao contentEntityObjectDao,
                                       AttachmentManager attachmentManager,
                                       IndexTaskFactory indexTaskFactory)
Constructs a rebuild change document index task.

Parameters:
searchable -
contentEntityObjectDao -
attachmentManager -
indexTaskFactory - @throws IllegalArgumentException if searchable is null, fails ChangeDocumentIndexPolicy.buildFor(Searchable) or is not the latest version.
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


Copyright © 2003-2013 Atlassian. All Rights Reserved.