Package com.rs.seagull.emulator.api
Class StopConditions
- java.lang.Object
- 
- com.rs.seagull.emulator.api.StopConditions
 
- 
 public class StopConditions extends Object Static methods for creating common Table.StopCondition's.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classStopConditions.EndMarkerStopConditionstatic classStopConditions.StopConditionAdapterAn abstract superclass for most concrete StopConditions.
 - 
Field SummaryFields Modifier and Type Field Description static StringCONTAINS_PARAMstatic StringIGNORE_CASE_PARAMstatic StringINCLUDE_MARKER_ROW_PARAMstatic StringIS_TRUE_FUNCTION_PARAMstatic org.apache.logging.log4j.LoggerLOGstatic StringMARKER_FIELD_PARAMstatic StringMARKER_VALUE_PARAMstatic StringMAX_PAGES_PARAMstatic StringRESET_KEY_PARAMstatic StringSTOP_CONDITION_JS_PARAMstatic StringTEST_BEFORE_PARAM
 - 
Constructor SummaryConstructors Constructor Description StopConditions()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static Table.StopConditioncolumnContainsValue(Session session, String markerField, String markerValue, boolean includeMarkerRow, boolean ignoreCase, boolean testBefore, boolean contains, int maxPages)Returns a StopCondition where the end is indicated by a particular column field having a particular value anywhere within it.static Table.StopConditioncomposite(Session session, List<Table.StopCondition> conditions, int maxPages)static Table.StopConditionemptyMarker(Session session, String markerField, boolean testBefore, int maxPages)Returns a StopCondition where the end is indicated by a particular field becoming empty.static Table.StopConditionendMarker(Session session, String markerField, String markerValue, boolean ignoreCase, boolean testBefore, boolean contains, String isTrueFunction, int maxPages)Returns a StopCondition where the end is indicated by a particular field having a particular value.static Table.StopConditionfirstPageMatches(Session session, Table table, int maxPages)Returns a StopCondition where the end is reached when the first page appears again.static Table.StopConditionjavaScript(Session session, String script)static Table.StopConditionoperatorError(Session session, com.rs.seagull.emulator.api.impl.TableImpl tableImpl, int maxPages, String resetKey)Returns a StopCondition where the end is reached when an operator error occurs.static Table.StopConditionscreenChanges(Session session, com.rs.seagull.emulator.api.impl.TableImpl tableImpl, int maxPages)Returns a StopCondition where the end is reached when the screen changes.static Table.StopConditiontwoFieldsMatch(Session session, String markerField1, String markerField2, boolean ignoreCase, boolean testBefore, boolean contains, int maxPages)Returns a StopCondition where the end is reached when two particular fields contain the same value.static Table.StopConditiontwoPagesMatch(Session session, Table table, int maxPages)Returns a StopCondition where the end is reached when two consecutive pages match.
 
- 
- 
- 
Field Detail- 
LOGpublic static final org.apache.logging.log4j.Logger LOG 
 - 
MARKER_FIELD_PARAMpublic static final String MARKER_FIELD_PARAM - See Also:
- Constant Field Values
 
 - 
MARKER_VALUE_PARAMpublic static final String MARKER_VALUE_PARAM - See Also:
- Constant Field Values
 
 - 
IGNORE_CASE_PARAMpublic static final String IGNORE_CASE_PARAM - See Also:
- Constant Field Values
 
 - 
CONTAINS_PARAMpublic static final String CONTAINS_PARAM - See Also:
- Constant Field Values
 
 - 
TEST_BEFORE_PARAMpublic static final String TEST_BEFORE_PARAM - See Also:
- Constant Field Values
 
 - 
INCLUDE_MARKER_ROW_PARAMpublic static final String INCLUDE_MARKER_ROW_PARAM - See Also:
- Constant Field Values
 
 - 
IS_TRUE_FUNCTION_PARAMpublic static final String IS_TRUE_FUNCTION_PARAM - See Also:
- Constant Field Values
 
 - 
STOP_CONDITION_JS_PARAMpublic static final String STOP_CONDITION_JS_PARAM - See Also:
- Constant Field Values
 
 - 
MAX_PAGES_PARAMpublic static final String MAX_PAGES_PARAM - See Also:
- Constant Field Values
 
 - 
RESET_KEY_PARAMpublic static final String RESET_KEY_PARAM - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
endMarkerpublic static Table.StopCondition endMarker(Session session, String markerField, String markerValue, boolean ignoreCase, boolean testBefore, boolean contains, String isTrueFunction, int maxPages) Returns a StopCondition where the end is indicated by a particular field having a particular value.- Parameters:
- session- The session.
- markerField- The name of the marker field.
- markerValue- The value the marker field has when the end of the table is reached.
- ignoreCase- True if the text comparison should ignore case.
- testBefore- True if the test should be done before processing the page.
- contains- True if the text comparison should be contains() rather than equals().
- isTrueFunction- An optional javascript isTrue function.
- maxPages- the maximum number of pages to retrieve
- Returns:
- a StopCondition.
 
 - 
emptyMarkerpublic static Table.StopCondition emptyMarker(Session session, String markerField, boolean testBefore, int maxPages) Returns a StopCondition where the end is indicated by a particular field becoming empty.- Parameters:
- session- The session.
- markerField- The name of the marker field.
- testBefore- True if the test should be done before processing the page.
- maxPages- the maximum number of pages to retrieve
- Returns:
- a StopCondition.
 
 - 
twoFieldsMatchpublic static Table.StopCondition twoFieldsMatch(Session session, String markerField1, String markerField2, boolean ignoreCase, boolean testBefore, boolean contains, int maxPages) Returns a StopCondition where the end is reached when two particular fields contain the same value. An example of this is "page x of y" where the "x" and the "y" are the two fields. When the "x" is equal to the "y", you're at the end.- Parameters:
- session- The session.
- markerField1- The name of the first marker field.
- markerField2- The name of the second marker field.
- ignoreCase- True if the text comparison should ignore case.
- testBefore- True if the test should be done before processing the page.
- contains- True if the text comparison should be contains() rather than equals().
- maxPages- the maximum number of pages to retrieve
- Returns:
- a StopCondition.
 
 - 
columnContainsValuepublic static Table.StopCondition columnContainsValue(Session session, String markerField, String markerValue, boolean includeMarkerRow, boolean ignoreCase, boolean testBefore, boolean contains, int maxPages) Returns a StopCondition where the end is indicated by a particular column field having a particular value anywhere within it.- Parameters:
- session- The session.
- markerField- The name of the marker column field.
- markerValue- The value the marker field contains when the end of the table is reached.
- includeMarkerRow- True if the row with the marker value in it should be included in the table's rows.
- ignoreCase- True if the text comparison should ignore case.
- testBefore- True if the test should be done before processing the page.
- contains- True if the text comparison should be contains() rather than equals().
- maxPages- the maximum number of pages to retrieve
- Returns:
- a StopCondition.
 
 - 
twoPagesMatchpublic static Table.StopCondition twoPagesMatch(Session session, Table table, int maxPages) Returns a StopCondition where the end is reached when two consecutive pages match.- Parameters:
- session- The session.
- table- The table.
- maxPages- the maximum number of pages to retrieve
- Returns:
- a StopCondition.
 
 - 
firstPageMatchespublic static Table.StopCondition firstPageMatches(Session session, Table table, int maxPages) Returns a StopCondition where the end is reached when the first page appears again.- Parameters:
- session- The session.
- table- The table.
- maxPages- the maximum number of pages to retrieve
- Returns:
- a StopCondition.
 
 - 
screenChangespublic static Table.StopCondition screenChanges(Session session, com.rs.seagull.emulator.api.impl.TableImpl tableImpl, int maxPages) Returns a StopCondition where the end is reached when the screen changes.- Parameters:
- session- The session.
- tableImpl- The table.
- maxPages- the maximum number of pages to retrieve
- Returns:
- a StopCondition.
 
 - 
operatorErrorpublic static Table.StopCondition operatorError(Session session, com.rs.seagull.emulator.api.impl.TableImpl tableImpl, int maxPages, String resetKey) Returns a StopCondition where the end is reached when an operator error occurs.- Parameters:
- session- The session.
- tableImpl- The table.
- maxPages- the maximum number of pages to retrieve
- resetKey- the reset key to use to reset an operator error
- Returns:
- a StopCondition.
 
 - 
javaScriptpublic static Table.StopCondition javaScript(Session session, String script) 
 - 
compositepublic static Table.StopCondition composite(Session session, List<Table.StopCondition> conditions, int maxPages) 
 
- 
 
-