Removed the siteId from all PublishingService and ChannelService methods. These services are no longer tied to a Share site.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@29255 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
N Smith
2011-07-21 16:10:17 +00:00
parent dd7facf14a
commit 2c3c17229b
35 changed files with 778 additions and 934 deletions

View File

@@ -22,6 +22,7 @@ package org.alfresco.repo.node;
import java.util.Collection;
import java.util.List;
import org.alfresco.service.cmr.repository.AssociationRef;
import org.alfresco.service.cmr.repository.ChildAssociationRef;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.NodeService;
@@ -110,4 +111,23 @@ public abstract class NodeUtils
};
}
public static NodeRef getSingleChildAssocNode(Collection<ChildAssociationRef> assocs, boolean getChild)
{
if(assocs != null && assocs.size()==1 )
{
ChildAssociationRef association = assocs.iterator().next();
return getChild ? association.getChildRef() : association.getParentRef();
}
return null;
}
public static NodeRef getSingleAssocNode(Collection<AssociationRef> assocs, boolean getTarget)
{
if(assocs != null && assocs.size()==1 )
{
AssociationRef association = assocs.iterator().next();
return getTarget ? association.getTargetRef() : association.getSourceRef();
}
return null;
}
}