Adds the subscriptions to the Bus

@param group
@param BusId
@throws SIResourceException
761415
private void addSubscriptionsToBus(BusGroup group, String busId) 
  throws SIResourceException
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "addSubscriptionsToBus", new Object[]{group, busId});
    
    // Get the complete list of Subscriptions from the MatchSpace 
    // and assign to the BusGroup.
    final ArrayList cdList =
      _proxyHandler
        .getMessageProcessor()
        .getMessageProcessorMatching()
        .getAllCDMatchTargets();

    // Iterate through the list of available "subscriptions".   
    final Iterator cdIterator = cdList.listIterator();
    while (cdIterator.hasNext())
    {
      // Get the Consumer Dispatcher for this element.
      final ConsumerDispatcher cd = (ConsumerDispatcher) cdIterator.next();

      // This won't actually send the subscriptions to the Neighbour
      // but generates the list of topics that are to be propagated.
      group.addLocalSubscription(cd.getConsumerDispatcherState(), null, null, false);

    }

    // Add proxy subscriptions that have been registered by
    // Neighbouring ME's.
    final ArrayList phList = 
      _proxyHandler
        .getMessageProcessor()
        .getMessageProcessorMatching()
        .getAllPubSubOutputHandlerMatchTargets();
        
    final ArrayList outputSeenList = new ArrayList();
    
    final Iterator phIterator = phList.listIterator();
    while (phIterator.hasNext())
    {
      // Get the PubSub OutputHandler for this element.
      final PubSubOutputHandler oh = (PubSubOutputHandler) phIterator.next();
      
      if (!outputSeenList.contains(oh) &&
           oh.neighbourOnDifferentBus(busId))
      {
        // This won't actually send the subscriptions to the Neighbour
        // but generates the list of topics that are to be propagated.
        final String topics[] = oh.getTopics();
        final SIBUuid12 topicSpaceUuid = oh.getTopicSpaceUuid();
        
        if (topics != null && topics.length > 0)
        {
          for (int i=0; i<topics.length; i++)        
          {
            group.addRemoteSubscription(topicSpaceUuid, topics[i], null, false);             
          }
        }
        
        // Add the neighbour to the list of seen Neighbours.
        outputSeenList.add(oh);
      }      
    }
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "addSubscriptionsToBus");
  }
715333
private function addGroup(MenuGroup $group)
    {
        if (!$this->hasGroup($group->getName())) {
            $this->groups[$group->getName()] = $group;
        }
    }
213065
@Override
  public CommunicationGroupDriver newCommunicationGroup(final Class<? extends Name<String>> groupName,
                                                        final Class<? extends Topology> topologyClass,
                                                        final int numberOfTasks, final int customFanOut) {
    LOG.entering("GroupCommDriverImpl", "newCommunicationGroup",
        new Object[]{Utils.simpleName(groupName), numberOfTasks});

    final CommunicationGroupDriver commGroupDriver;
    try {
      commGroupDriver
          = commGroupDriverFactory.getNewInstance(groupName, topologyClass, numberOfTasks, customFanOut);
    } catch (final InjectionException e) {
      LOG.log(Level.WARNING, "Cannot inject new CommunicationGroupDriver");
      throw new RuntimeException(e);
    }

    commGroupDrivers.put(groupName, commGroupDriver);
    LOG.exiting("GroupCommDriverImpl", "newCommunicationGroup",
        "Created communication group: " + Utils.simpleName(groupName));
    return commGroupDriver;
  }
1089554
public void setReplicationGroup(java.util.Collection<Replica> replicationGroup) {
        if (replicationGroup == null) {
            this.replicationGroup = null;
            return;
        }

        this.replicationGroup = new java.util.ArrayList<Replica>(replicationGroup);
    }
484414
public void appendBatchWith(List<Card> groups) {
        if (mGroupBasicAdapter != null) {
            insertBatchWith(mGroupBasicAdapter.getGroups().size(), groups);
        }
    }
728360
private function addGroup($group)
	{
		if($group != null)
		{
			if($this->groups == null)
				$this->groups = array();
			$this->groups[] = $group;
		}
	}
613714
private void doStartGroup(String groupID) {
    DefaultConnectionOutputGroup group = groups.get(groupID);
    if (group != null) {
      group.handleStart();
    }
  }
88829
public void setReplicationGroup(java.util.Collection<ReplicaDescription> replicationGroup) {
        if (replicationGroup == null) {
            this.replicationGroup = null;
            return;
        }

        this.replicationGroup = new java.util.ArrayList<ReplicaDescription>(replicationGroup);
    }
667051
private void deleteBus(BusGroup group)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "deleteBus", group);

    // Find the position in the list which contains the group, and remove
    // the group.

    final BusGroup[] t = _buses;
    for (int i = 0; i < _buses.length; i++)
    {
      if (_buses[i].equals(group))
      {
        _buses = new BusGroup[t.length - 1];
        if (i > 0)
          System.arraycopy(t, 0, _buses, 0, i);
        if (i < t.length - 1)
          System.arraycopy(t, i + 1, _buses, i, t.length - 1 - i);

        break;
      }
    }

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "deleteBus");
  }
152174
void groupReady(String group) {
    if (log.isDebugEnabled()) {
      log.debug(String.format("%s - Group ready: Group[group=%s]", this, group));
    }
    eventBus.send(outAddress, new JsonObject().putString("action", "group").putString("group", group));
  }
118913
public void addDataSource(int groupno, DataSource datasource) {
    // the loader takes care of validation
    if (groupno == 0)
      datasources.add(datasource);
    else if (groupno == 1)
      group1.add(datasource);
    else if (groupno == 2)
      group2.add(datasource);
  }
926745
void addGroupMember(final ManagementVertex vertex) {

		while (this.groupMembers.size() <= vertex.getIndexInGroup()) {
			this.groupMembers.add(null);
		}

		this.groupMembers.set(vertex.getIndexInGroup(), vertex);

		this.getGraph().addVertex(vertex.getID(), vertex);
	}
1161812
protected void addAllGroupsToRole(Set<String> groups, String role) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            SibTr.entry(tc, CLASS_NAME + "addAllGroupsToRole", new Object[] { groups, role });
        }
        Set<String> groupsForTheRole = roleToGroupMap.get(role);
        if (groupsForTheRole != null) {
            groupsForTheRole.addAll(groups);
        } else {
            groupsForTheRole = groups;
        }
        roleToGroupMap.put(role, groupsForTheRole);
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            SibTr.exit(tc, CLASS_NAME + "addAllGroupsToRole");
        }
    }
463243
public void setGroups(java.util.Collection<GroupIdentifier> groups) {
        if (groups == null) {
            this.groups = null;
            return;
        }

        this.groups = new com.amazonaws.internal.SdkInternalList<GroupIdentifier>(groups);
    }
1019327
@Override
	public void addGroup(RibbonGroup ribbonGroup) {
		if (null == ribbonGroup) {
			throw new IllegalArgumentException("Cannot add RibbonGroup with null value.");
		}
		groups.add(ribbonGroup);
		ribbonGroup.setShowTitle(showGroupTitles);
		ribbonGroup.asWidget().setStyleName(getStyleName() + "Group");
		addMember(ribbonGroup.asWidget());
	}
952721
public void setGroupService(
		com.liferay.portal.kernel.service.GroupService groupService) {
		this.groupService = groupService;
	}
666268
public void addRootGroup(final Group nextRootGroup)
    {
        this.getRootGroups().add(nextRootGroup);
        
        RepositoryConnection conn = null;
        try
        {
            conn = this.repository.getConnection();
            conn.begin();
            
            this.storeGroup(nextRootGroup, conn, true);
            
            conn.commit();
        }
        catch(final RepositoryException e)
        {
            this.log.error("Found exception while storing root group", e);
            if(conn != null)
            {
                try
                {
                    conn.rollback();
                }
                catch(final RepositoryException e1)
                {
                    this.log.error("Found exception while trying to roll back connection", e1);
                }
            }
        }
        finally
        {
            if(conn != null)
            {
                try
                {
                    conn.close();
                }
                catch(final RepositoryException e)
                {
                    this.log.error("Found exception closing repository connection", e);
                }
            }
        }
    }