mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged HEAD-BUG-FIX (5.0/Cloud) to HEAD (5.0/Cloud)
80520: Merged WAT1 (5.0/Cloud) to HEAD-BUG-FIX (5.0/Cloud) 74961: ACE-1582: Added index control and custom data support for the facet configs. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@82817 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -9,13 +9,35 @@
|
||||
"minFilterValueLength" : ${facet.minFilterValueLength?c},
|
||||
"sortBy" : "${facet.sortBy}",
|
||||
"scope" : "${facet.scope}",
|
||||
<#if facet.scopedSites?size != 0>
|
||||
"scopedSites" : [
|
||||
<#if facet.scopedSites??>
|
||||
<#list facet.scopedSites as site>
|
||||
"${site}"<#if site_has_next>,</#if>
|
||||
</#list>
|
||||
</#if>
|
||||
],
|
||||
</#if>
|
||||
<#if facet.customProperties?size != 0>
|
||||
"customProperties" :
|
||||
{
|
||||
<#list facet.customProperties as propDetails>
|
||||
"${propDetails.name.localName?string}":
|
||||
{
|
||||
"name" : "${propDetails.name?string}",
|
||||
<#if propDetails.value?is_enumerable>
|
||||
"value" : [
|
||||
<#list propDetails.value as v>
|
||||
"${v?string}"<#if v_has_next>,</#if>
|
||||
</#list>
|
||||
],
|
||||
<#else>
|
||||
"value" : "${propDetails.value?string}",
|
||||
</#if>
|
||||
"type" : <#if propDetails.type??>"${propDetails.type}"<#else>null</#if>,
|
||||
"title" : <#if propDetails.title??>"${propDetails.title}"<#else>null</#if>
|
||||
}<#if propDetails_has_next>,</#if>
|
||||
</#list>
|
||||
},
|
||||
</#if>
|
||||
"index" : ${facet.index?c},
|
||||
"isEnabled" : ${facet.enabled?c},
|
||||
"isDefault" : ${facet.default?c}
|
||||
|
@@ -112,7 +112,7 @@ public abstract class AbstractSolrFacetConfigAdminWebScript extends DeclarativeW
|
||||
final int minFilterValueLength = json.getInt(PARAM_MIN_FILTER_VALUE_LENGTH);
|
||||
final String sortBy = json.getString(PARAM_SORT_BY);
|
||||
final String scope = json.getString(PARAM_SCOPE);
|
||||
final int index = getValue(Integer.class, json.opt(PARAM_INDEX), 0); //FIXME get the index from the service
|
||||
final int index = getValue(Integer.class, json.opt(PARAM_INDEX), facetService.getNextIndex());
|
||||
final boolean isEnabled = getValue(Boolean.class, json.opt(PARAM_IS_ENABLED), true);
|
||||
JSONArray scopedSitesJsonArray = json.getJSONArray(PARAM_SCOPED_SITES);
|
||||
Set<String> scopedSites = null;
|
||||
|
@@ -19,9 +19,7 @@
|
||||
|
||||
package org.alfresco.repo.web.scripts.solr.facet;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.alfresco.repo.search.impl.solr.facet.SolrFacetProperties;
|
||||
@@ -52,8 +50,7 @@ public class SolrFacetConfigAdminGet extends AbstractSolrFacetConfigAdminWebScri
|
||||
|
||||
if (filterID == null)
|
||||
{
|
||||
List<SolrFacetProperties> filters = new ArrayList<>(facetService.getFacets().values());
|
||||
model.put("filters", filters);
|
||||
model.put("filters", facetService.getFacets());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user