mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged searchrep (5.2.1) to 5.2.N (5.2.1)
136763 gjames: SEARCH-339: Switching to an Interval Set git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@137049 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -76,6 +76,8 @@ import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.ListIterator;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import java.util.TimeZone;
|
||||
import java.util.regex.Matcher;
|
||||
|
||||
/**
|
||||
@@ -499,7 +501,7 @@ public class SearchMapper
|
||||
{
|
||||
ParameterCheck.mandatory("facetIntervals intervals", facetIntervals.getIntervals());
|
||||
|
||||
List<IntervalSet> globalSets = facetIntervals.getSets();
|
||||
Set<IntervalSet> globalSets = facetIntervals.getSets();
|
||||
validateSets(globalSets, "facetIntervals");
|
||||
|
||||
if (facetIntervals.getIntervals() != null && !facetIntervals.getIntervals().isEmpty())
|
||||
@@ -627,7 +629,7 @@ public class SearchMapper
|
||||
|
||||
}
|
||||
|
||||
protected void validateSets(List<IntervalSet> intervalSets, String prefix)
|
||||
protected void validateSets(Set<IntervalSet> intervalSets, String prefix)
|
||||
{
|
||||
if (intervalSets != null && !intervalSets.isEmpty())
|
||||
{
|
||||
@@ -635,6 +637,11 @@ public class SearchMapper
|
||||
{
|
||||
ParameterCheck.mandatory(prefix+" sets start", aSet.getStart());
|
||||
ParameterCheck.mandatory(prefix+" sets end", aSet.getEnd());
|
||||
|
||||
if (aSet.getLabel() == null)
|
||||
{
|
||||
aSet.setLabel(aSet.toRange());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user