Skip to content

Commit

Permalink
adding date constraints to card view
Browse files Browse the repository at this point in the history
  • Loading branch information
shoeffner committed Nov 16, 2016
1 parent fc16728 commit 2ece086
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import com.intuit.wasabi.api.pagination.filters.PaginationFilterProperty;
import org.apache.commons.lang3.StringUtils;

import javax.ws.rs.HEAD;
import java.util.function.BiPredicate;
import java.util.function.Function;

Expand All @@ -40,7 +39,8 @@ public ExperimentDetailFilter() {
super.registerFilterModifierForProperties(FilterUtil.FilterModifier.APPEND_TIMEZONEOFFSET, Property.mod_time,
Property.start_time, Property.end_time);
super.excludeFromFulltext(Property.application_name_exact, Property.mod_time,
Property.end_time, Property.start_time, Property.favorite, Property.isControl);
Property.end_time, Property.start_time, Property.favorite, Property.isControl,
Property.date_constraint_start, Property.date_constraint_end);
}

/**
Expand All @@ -65,7 +65,9 @@ public enum Property implements PaginationFilterProperty<ExperimentDetail> {
bucketDetails.stream().anyMatch(bucketDetail -> bucketDetail.isControl() == Boolean.valueOf(filter)))),
mod_time(ExperimentDetail::getModificationTime, FilterUtil::extractTimeZoneAndTestDate),
start_time(ExperimentDetail::getStartTime, FilterUtil::extractTimeZoneAndTestDate),
end_time(ExperimentDetail::getEndTime, FilterUtil::extractTimeZoneAndTestDate);
end_time(ExperimentDetail::getEndTime, FilterUtil::extractTimeZoneAndTestDate),
date_constraint_start(ExperimentDetail::getStartTime, ExperimentFilter::constraintTest),
date_constraint_end(ExperimentDetail::getEndTime, ExperimentFilter::constraintTest);

private final Function<ExperimentDetail, ?> propertyExtractor;
private final BiPredicate<?, String> filterPredicate;
Expand Down

0 comments on commit 2ece086

Please sign in to comment.