Updated Spring Social JARs and made channels.get webscript a bit more robust.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@28686 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
N Smith
2011-06-29 10:42:32 +00:00
parent 8ffa518037
commit 1aad9f6ac4
2 changed files with 41 additions and 35 deletions

View File

@@ -3,7 +3,7 @@
{
"data":
{
urlLength: ${data.urlLength},
<#if data.urlLength??>urlLength: ${data.urlLength},</#if>
"publishChannels":
<@publishLib.channelsJSON channels=data.publishChannels />,
"statusUpdateChannels":

View File

@@ -2,10 +2,12 @@
<#macro channelsJSON channels>
<#escape x as jsonUtils.encodeJSONString(x)>
[
<#if channels??>
<#list channels as channel>
<@channelJSON channel=channel />
<#if channel_has_next>,</#if>
</#list>
</#if>
]
</#escape>
</#macro>
@@ -27,7 +29,7 @@
"id": "${type.id}",
"title": "${type.title}",
"url": "${type.url}",
"channelNodeType": "${type.channelNodeType}",
<#if type.channelNodeType??>"channelNodeType": "${type.channelNodeType}",</#if>
"supportedContentTypes":
<@iterateStringsJSON strings=type.supportedContentTypes />,
"supportedMimeTypes":
@@ -35,17 +37,21 @@
"canPublish": ${type.canPublish},
"canPublishStatusUpdates": ${type.canPublishStatusUpdates},
"canUnpublish": ${type.canUnpublish},
"maxStatusLength": ${type.maxStatusLength},
"icon": "${type.icon}"
<#if type.icon??>"icon": "${type.icon}",</#if>
"maxStatusLength": ${type.maxStatusLength}
}
</#macro>
<#-- Renders a List of Strings. -->
<#macro iterateStringsJSON strings>
<#if strings??>
[
<#list strings as string>
"${string}"
<#if string_has_next>,</#if>
</#list>
]
<#else>
[]
</#if>
</#macro>