s = s.trim();
// This block checks for errors in the format of specifying date range
if (s.contains("::")) {
String[] dateRange = s.split("::");
if (dateRange.length != 2) {
throw new XException(ErrorCode.E0308, "'" + s + "'. Date value expected on both sides of the scope resolution operator '::' to signify start and end of range");
}
Date start;
Date end;
try {
start = DateUtils.parseDateUTC(dateRange[0].trim());
end = DateUtils.parseDateUTC(dateRange[1].trim());
}
catch (Exception dx) {
throw new XException(ErrorCode.E0308, "Error in parsing start or end date");
}
if (start.after(end)) {
throw new XException(ErrorCode.E0308, "'" + s + "'. Start date '" + start + "' is older than end date: '" + end + "'");
}
List<CoordinatorActionBean> listOfActions = getActionIdsFromDateRange(jobId, start, end);
actionSet.addAll(listOfActions);
}
else {
throw new XException(ErrorCode.E0308, "'" + s + "'. Separator '::' is missing for start and end dates of range");
}
}
List<CoordinatorActionBean> coordActions = new ArrayList<CoordinatorActionBean>();
for (CoordinatorActionBean coordAction : actionSet) {
coordActions.add(coordAction);