com.atlassian.confluence.content.render.xhtml.migration
Class WikiMarkupContentEntityObjectMigrationWorkSource

java.lang.Object
  extended by com.atlassian.confluence.content.render.xhtml.migration.WikiMarkupContentEntityObjectMigrationWorkSource
All Implemented Interfaces:
BatchableWorkSource<ContentEntityObject>

public class WikiMarkupContentEntityObjectMigrationWorkSource
extends java.lang.Object
implements BatchableWorkSource<ContentEntityObject>

Source that provides batches of ContentEntityObjects that require migration.

This class is thread-safe.


Constructor Summary
WikiMarkupContentEntityObjectMigrationWorkSource(ContentDao contentDao, int batchSize)
           
WikiMarkupContentEntityObjectMigrationWorkSource(ContentDao contentDao, int batchSize, int contentCount)
           
 
Method Summary
 java.util.List<ContentEntityObject> getBatch()
          Returns a batch of work.
 int getTotalSize()
           
 boolean hasMoreBatches()
           
 int numberOfBatches()
           
 void reset(int total)
          Reset the work source ready to begin getting batches again.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WikiMarkupContentEntityObjectMigrationWorkSource

public WikiMarkupContentEntityObjectMigrationWorkSource(ContentDao contentDao,
                                                        int batchSize)

WikiMarkupContentEntityObjectMigrationWorkSource

public WikiMarkupContentEntityObjectMigrationWorkSource(ContentDao contentDao,
                                                        int batchSize,
                                                        int contentCount)
Parameters:
contentDao -
batchSize - the number of items in each batch of work
contentCount - the total amount of work should you have already pre-computed it.
Method Detail

getBatch

public java.util.List<ContentEntityObject> getBatch()
Returns a batch of work. When work is exhausted an empty list is returned.

Specified by:
getBatch in interface BatchableWorkSource<ContentEntityObject>
Returns:
batch of work

hasMoreBatches

public boolean hasMoreBatches()
Specified by:
hasMoreBatches in interface BatchableWorkSource<ContentEntityObject>
Returns:
true if more work batches exist

numberOfBatches

public int numberOfBatches()
Specified by:
numberOfBatches in interface BatchableWorkSource<ContentEntityObject>
Returns:
total number of work batches available.

getTotalSize

public int getTotalSize()
Specified by:
getTotalSize in interface BatchableWorkSource<ContentEntityObject>

reset

public void reset(int total)
Description copied from interface: BatchableWorkSource
Reset the work source ready to begin getting batches again.

Specified by:
reset in interface BatchableWorkSource<ContentEntityObject>


Copyright © 2003-2014 Atlassian. All Rights Reserved.