Merged HEAD-BUG-FIX (5.0/Cloud) to HEAD (5.0/Cloud)

84917: Merged PLATFORM1 (5.0/Cloud) to HEAD-BUG-FIX (5.0/Cloud)
      83444: ACE-2639. Added property title (where available) to JSON rsp.
      As the title can only be retrieved using a getTitle(MessageLookup) call, I had to get the titles from the Java layer, rather than a straight get call in the FTL. Makes the API a bit messier. I may get to tidy it as part of ongoing work on ACE-2639.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@85235 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Mark Rogers
2014-09-20 09:08:52 +00:00
parent be04629fec
commit 9abe30d450
2 changed files with 8 additions and 4 deletions

View File

@@ -2,9 +2,12 @@
{ {
"properties" : { "properties" : {
<#list properties as property> <#list properties as property>
"${property.name}" : { "${property.second.name.prefixString}" : {
"modelQName" : "${property.model.name.prefixString}", <#if property.first??>
"dataType" : "${property.dataType.name.prefixString}" "title" : "${property.first}",
</#if>
"dataType" : "${property.second.dataType.name.prefixString}",
"modelQName" : "${property.second.model.name.prefixString}"
}<#if property_has_next>,</#if> }<#if property_has_next>,</#if>
</#list> </#list>
} }

View File

@@ -27,6 +27,7 @@ import org.alfresco.service.cmr.dictionary.PropertyDefinition;
import org.alfresco.service.namespace.NamespaceException; import org.alfresco.service.namespace.NamespaceException;
import org.alfresco.service.namespace.NamespaceService; import org.alfresco.service.namespace.NamespaceService;
import org.alfresco.service.namespace.QName; import org.alfresco.service.namespace.QName;
import org.alfresco.util.Pair;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.springframework.extensions.webscripts.Cache; import org.springframework.extensions.webscripts.Cache;
@@ -72,7 +73,7 @@ public class FacetablePropertiesGet extends AbstractSolrFacetConfigAdminWebScrip
final Map<String, Object> model = new HashMap<>(); final Map<String, Object> model = new HashMap<>();
final Set<PropertyDefinition> facetableProperties; final Set<Pair<String, PropertyDefinition>> facetableProperties;
if (contentClassQName == null) if (contentClassQName == null)
{ {
facetableProperties = facetService.getFacetableProperties(); facetableProperties = facetService.getFacetableProperties();