Created channels.get Rest Api webscript. Tested in PublishingRestApiTest

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@28454 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
N Smith
2011-06-17 12:46:17 +00:00
parent 830a5e259c
commit f3902d9eb5
3 changed files with 89 additions and 54 deletions

View File

@@ -95,6 +95,10 @@ public class ChannelHelper
public Channel buildChannelObject(NodeRef nodeRef, ChannelService channelService)
{
if(nodeRef == null || nodeService.exists(nodeRef)==false)
{
return null;
}
Map<QName, Serializable> props = nodeService.getProperties(nodeRef);
String channelTypeId = (String) props.get(PublishingModel.PROP_CHANNEL_TYPE_ID);
ChannelType channelType = channelService.getChannelType(channelTypeId);