mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user