From a750dd05356cfb5fe9cb851fd4b076559c6f5dce Mon Sep 17 00:00:00 2001 From: Gethin James Date: Wed, 31 May 2017 14:35:30 +0200 Subject: [PATCH] SEARCH-340: Changing range tags to label --- .../service/cmr/search/RangeParameters.java | 35 ++++++++++--------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/src/main/java/org/alfresco/service/cmr/search/RangeParameters.java b/src/main/java/org/alfresco/service/cmr/search/RangeParameters.java index 0e85b6d5b2..780f60dcfb 100644 --- a/src/main/java/org/alfresco/service/cmr/search/RangeParameters.java +++ b/src/main/java/org/alfresco/service/cmr/search/RangeParameters.java @@ -39,16 +39,15 @@ import org.codehaus.jackson.annotate.JsonProperty; @AlfrescoPublicApi public class RangeParameters { - private String field; - private String start; - private String end; - private String gap; - private boolean hardend; - private List other; - private List include; - private List tags; - private List excludeFilters; - + private final String field; + private final String start; + private final String end; + private final String gap; + private final boolean hardend; + private final List other; + private final List include; + private final String label; + private final List excludeFilters; /** * Constructor. @@ -60,7 +59,7 @@ public class RangeParameters * @param hardend * @param other can have one of the following values: before,after,between,none * @param include can have one of the following values: lower,upper,edge,outer,all - * @param tags + * @param label * @param excludeFilters */ @JsonCreator @@ -71,7 +70,7 @@ public class RangeParameters @JsonProperty("hardend") boolean hardend, @JsonProperty("other")List other, @JsonProperty("include")List include, - @JsonProperty("tags")List tags, + @JsonProperty("label") String label, @JsonProperty("excludeFilters")List excludeFilters) { super(); @@ -80,9 +79,9 @@ public class RangeParameters this.end = end; this.gap = gap; this.hardend = hardend; - this.other = other; - this.include = include; - this.tags = tags == null? Collections.emptyList():tags; + this.other = other == null? Collections.emptyList():other; + this.include = include == null? Collections.emptyList():include; + this.label = label; this.excludeFilters = excludeFilters == null? Collections.emptyList():excludeFilters; } @@ -114,10 +113,11 @@ public class RangeParameters { return include; } - public List getTags() + public String getLabel() { - return tags; + return label; } + public List getExcludeFilters() { return excludeFilters; @@ -200,6 +200,7 @@ public class RangeParameters } return true; } + public boolean isRangeEndInclusive() { List options = new ArrayList();