com.atlassian.confluence.it
Class LongRunningTask

java.lang.Object
  extended by com.atlassian.confluence.it.LongRunningTask

public class LongRunningTask
extends Object


Field Summary
static String LONGRUNNINGTASK_ACTION
           
 
Method Summary
static LongRunningTask getInstance(net.sourceforge.jwebunit.junit.WebTester tester, String taskId)
           
static LongRunningTask getInstanceForDisplayedTask(net.sourceforge.jwebunit.junit.WebTester tester)
           
static LongRunningTask getInstanceForSetup(net.sourceforge.jwebunit.junit.WebTester tester, String taskId)
           
 boolean waitToComplete(long timeout, TimeUnit unit, String errorText)
           
 boolean waitToComplete(long timeout, TimeUnit unit, String pageLocation, String waitForText, String errorText)
          Wait for the current long running task to complete.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LONGRUNNINGTASK_ACTION

public static final String LONGRUNNINGTASK_ACTION
See Also:
Constant Field Values
Method Detail

getInstanceForSetup

public static LongRunningTask getInstanceForSetup(net.sourceforge.jwebunit.junit.WebTester tester,
                                                  String taskId)

getInstance

public static LongRunningTask getInstance(net.sourceforge.jwebunit.junit.WebTester tester,
                                          String taskId)

getInstanceForDisplayedTask

public static LongRunningTask getInstanceForDisplayedTask(net.sourceforge.jwebunit.junit.WebTester tester)

waitToComplete

public boolean waitToComplete(long timeout,
                              TimeUnit unit,
                              String pageLocation,
                              String waitForText,
                              String errorText)
Wait for the current long running task to complete. This is indicated either by completion getting to 100% or a particular string which indicates an error appearing in the response.

Parameters:
timeout - fail after this many time units if the long running task has not completed.
unit - the units for the timeout.
pageLocation - the relative location to poll.
waitForText - the text which indicates the long running task has finished.
errorText - the appearance of this string in the response indicates that the task has completed with an error.
Returns:
true if the task completed successfully, otherwise false.

waitToComplete

public boolean waitToComplete(long timeout,
                              TimeUnit unit,
                              String errorText)


Copyright © 2003-2012 Atlassian. All Rights Reserved.