Removed the Environment from the publishing implementation.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@29183 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
N Smith
2011-07-19 11:39:11 +00:00
parent aea1bf678d
commit b544f0effe
20 changed files with 247 additions and 315 deletions

View File

@@ -51,6 +51,16 @@ public class ChannelImpl implements Channel
this.channelHelper = channelHelper;
}
/**
* {@inheritDoc}
*/
@Override
public String getId()
{
// TODO Auto-generated method stub
return nodeRef.toString();
}
/**
* {@inheritDoc}
*/
@@ -89,6 +99,7 @@ public class ChannelImpl implements Channel
@Override
public void publish(NodeRef nodeToPublish)
{
channelHelper.addPublishedAspect(nodeToPublish, nodeRef);
if(channelHelper.canPublish(nodeToPublish, channelType))
{
channelType.publish(nodeToPublish, getProperties());
@@ -119,8 +130,7 @@ public class ChannelImpl implements Channel
*/
public String getUrl(NodeRef publishedNode)
{
NodeRef mappedChannel = channelHelper.mapChannelNOde(nodeRef);
NodeRef mappedNode = channelHelper.mapSourceToEnvironment(publishedNode, mappedChannel);
NodeRef mappedNode = channelHelper.mapSourceToEnvironment(publishedNode, nodeRef);
return channelType.getNodeUrl(mappedNode);
}
}