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

57125: Merged V4.2-BUG-FIX (4.2.1) to HEAD-BUG-FIX (Cloud/4.3)
      56907: Merged V4.1-BUG-FIX (4.1.7) to V4.2-BUG-FIX (4.2.1)
         56679: Merged DEV to V4.1-BUG-FIX (4.1.7)
            54636, 56602 : MNT-9526 : REST API call like .http://localhost:8080/alfresco/service/api/classes/cm_content/property/cm_name. never returns constraint.
               - Changing propertydefinition.lib.ftl for appropriate output


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@61750 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2014-02-11 19:50:54 +00:00
parent e540f243bb
commit 81cdd77189
2 changed files with 24 additions and 16 deletions

View File

@@ -25,20 +25,24 @@
"indexed" : ${propertydefs.indexed?string},
"indexedAtomically" : ${propertydefs.indexedAtomically?string},
"constraints" :
[<#--
<#if propertydefs.constraints?exists>
[
<#list propertydefs.constraints as constraintdefs>
{
<#assign keys = constraintdefs.getConstraint()?keys>
"type" : "${constraintdefs.getConstraint().getType()}",
"parameters" :
[
<#assign params = constraintdefs.getConstraint().getParameters()>
<#assign keys = params?keys>
<#list keys as key>
<#if key == "expression">
"${key}" : <#if constraintdefs.getConstraint()[key]?exists>"${constraintdefs.getConstraint()[key]}" <#else>"has no value"</#if>
</#if>
{
"${key}" : <#rt><#if params[key]?is_enumerable>[<#list params[key] as mlist>"${mlist}"<#if mlist_has_next>,</#if></#list>]
<#t><#else><#if params[key]?is_boolean>${params[key]?string}<#else>"${params[key]?string}"</#if></#if>
}
<#if key_has_next>,</#if>
</#list>
]
}<#if constraintdefs_has_next>,</#if>
</#list>
</#if>-->
],
"url" : "${"/api/property/" + propertydefs.name.toPrefixString()?replace(":","/")}"
}

View File

@@ -25,20 +25,24 @@
"indexed" : ${propertydefs.indexed?string},
"indexedAtomically" : ${propertydefs.indexedAtomically?string},
"constraints" :
[<#--
<#if propertydefs.constraints?exists>
[
<#list propertydefs.constraints as constraintdefs>
{
<#assign keys = constraintdefs.getConstraint()?keys>
"type" : "${constraintdefs.getConstraint().getType()}",
"parameters" :
[
<#assign params = constraintdefs.getConstraint().getParameters()>
<#assign keys = params?keys>
<#list keys as key>
<#if key == "expression">
"${key}" : <#if constraintdefs.getConstraint()[key]?exists>"${constraintdefs.getConstraint()[key]}" <#else>"has no value"</#if>
</#if>
{
"${key}" : <#rt><#if params[key]?is_enumerable>[<#list params[key] as mlist>"${mlist}"<#if mlist_has_next>,</#if></#list>]
<#t><#else><#if params[key]?is_boolean>${params[key]?string}<#else>"${params[key]?string}"</#if></#if>
}
<#if key_has_next>,</#if>
</#list>
]
}<#if constraintdefs_has_next>,</#if>
</#list>
</#if>-->
],
"url" : "${"/api/property/" + propertydefs.name.toPrefixString()?replace(":","_")}"
}