private boolean isPublicationReadable(
     WAPrimaryKey pk, String instanceId, Collection<NodePK> autorizedNodes)
     throws RemoteException, CreateException {
   if (pk.getInstanceId().equals(instanceId)) {
     Collection<NodePK> fathers = getPublicationFathers(pk);
     return CollectionUtils.containsAny(autorizedNodes, fathers);
   } else {
     // special case of an alias between two ECM applications
     // check if publication which contains attachment is an alias into this node
     Collection<Alias> aliases = getPublicationAliases(pk);
     for (Alias alias : aliases) {
       NodePK aliasPK = new NodePK(alias.getId(), alias.getInstanceId());
       if (autorizedNodes.contains(aliasPK)) {
         return true;
       }
     }
   }
   return false;
 }
 protected Collection<Alias> getPublicationAliases(WAPrimaryKey pk)
     throws CreateException, RemoteException {
   return findPublicationBm().getAlias(new PublicationPK(pk.getId(), pk.getInstanceId()));
 }
 protected Collection<NodePK> getPublicationFathers(WAPrimaryKey pk)
     throws CreateException, RemoteException {
   return findPublicationBm().getAllFatherPK(new PublicationPK(pk.getId(), pk.getInstanceId()));
 }