Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,26 @@ public static StepResult findStepResult(StepResult result, String stepResultKey)
}

/**
* Only works with the DEFAULT Result identifier keys
* @param taskResult the TaskResult to search within
* @param stepIdentifier for result
* @return String object if exists, empty string otherwise
*/
public static String findStringResult(TaskResult taskResult, String stepIdentifier) {
if (taskResult == null || taskResult.getResults() == null || stepIdentifier == null) {
return null;
}
for (StepResult stepResult : taskResult.getResults().values()) {
String stringResult = findStringResult(stepIdentifier, stepResult);
if (stringResult != null) {
return stringResult;
}
}
return null;
}

/**
* Only works with the DEFAULT Result identifier keys
* @param stepIdentifier for result
* @param stepResult the step result to try and find the String result in
* @return String object if exists, empty string otherwise
Expand All @@ -111,6 +131,7 @@ public static String findStringResult(String stepIdentifier, StepResult stepResu
}

/**
* Only works with the DEFAULT Result identifier keys
* @param stepIdentifier for result
* @param stepResult the step result to try and find the boolean result in
* @param taskResult the task result to try and find the boolean result in
Expand All @@ -128,6 +149,7 @@ public static Boolean findBooleanResult(String stepIdentifier, StepResult stepRe
}

/**
* Only works with the DEFAULT Result identifier keys
* @param stepIdentifier for result
* @param stepResult the step result to try and find the date result in
* @return String object if exists, empty string otherwise
Expand All @@ -144,6 +166,7 @@ public static Date findDateResult(String stepIdentifier, StepResult stepResult)
}

/**
* Only works with the DEFAULT Result identifier keys
* Will find the first Result with a specific class type from within a StepResult
* @param stepResult the step result to search within
* @param comparator a class comparator that will be provided by the caller
Expand Down