Outcome requirement = _jobBuilder.getRequirement();
if (requirement == null) {
setText(NO_FILTER_TEXT);
} else {
if (requirement instanceof FilterOutcome) {
FilterOutcome filterOutcome = (FilterOutcome) requirement;
Enum<?> category = filterOutcome.getCategory();
if (filterOutcome instanceof LazyFilterOutcome) {
// if possible, use the builder in stead of the job (getting
// the job may cause an exception if the builder is not
// correctly configured yet)
FilterJobBuilder<?, ?> fjb = ((LazyFilterOutcome) filterOutcome).getFilterJobBuilder();
String filterLabel = LabelUtils.getLabel(fjb);
setText(filterLabel + ": " + category);
} else {
FilterJob filterJob = filterOutcome.getFilterJob();
setText(LabelUtils.getLabel(filterJob) + ": " + category);
}
} else if (requirement instanceof MergedOutcome) {
MergedOutcomeJob job = ((MergedOutcome) requirement).getMergedOutcomeJob();
setText(LabelUtils.getLabel(job));