Skip to content

Instantly share code, notes, and snippets.

@chriswk
Last active August 29, 2015 13:56
Show Gist options
  • Save chriswk/9046891 to your computer and use it in GitHub Desktop.
Save chriswk/9046891 to your computer and use it in GitHub Desktop.
private void addPublishedFacetAndParameter() {
FieldParameterConfig fieldConfig = new FieldParameterConfig("periode",
"publisheddate",
Type.PERIODE,
Operator.GREATERTHAN_DAYSBACKWARD).withTagName("periode_tag");
addFieldParameterConfig(fieldConfig);
PeriodFacetConfig publishedPeriodConfig = new PeriodFacetConfig("periode").withParameterConfig(fieldConfig)
.withQueries(Arrays.asList(new PeriodQuery(1, "Siste 24 timer"),
new PeriodQuery(3, "Siste 3 dager"),
new PeriodQuery(DAYS_IN_WEEK, "Sist uke"),
new PeriodQuery(DAYS_IN_MONTH, "Sist måned")))
.withCustomQueryText("Siste %s dager")
.withExcludeTagName("periode_tag");
addPeriodFacetConfig(publishedPeriodConfig);
}
List<NavigatorConfig> .... =
new BasicNavigatorConfig("periode", StandardNavigatorTypes.PERIODE).withResets(NAVIGATOR_RESETS),
List<FilterSectionConfig ... =
new FilterSectionConfig("periode", "Publisert");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment