mil.dod.th.ose.gui.webapp/src/mil/dod/th/ose/gui/webapp/comms/CommsMgrImpl.java
private synchronized List<UUID> mergeLayersHelper(final CommType type, final List<FactoryObjectInfo> infoList, 
            final int systemId)
    {        
        final List<UUID> tmpUuidList = new ArrayList<UUID>();
        for (FactoryObjectInfo info: infoList)
        {
            final UUID uuid = SharedMessageUtils.convertProtoUUIDtoUUID(info.getUuid());
            final String pid = info.getPid();
            final String productType = info.getProductType();
            
            if (type.equals(CommType.TransportLayer))
            {
                final List<CommsLayerBaseModel> layerList = m_TransportLayers.get(systemId);
                if (findLayer(uuid, layerList) == null) //if layer does not exist
                {                    
                    processNewTransportLayer(systemId, uuid, pid, productType);
                }
                tmpUuidList.add(uuid);
            }
            else if (type.equals(CommType.Linklayer)) //if layer does not exist
            {
                final List<CommsLayerLinkModelImpl> layerList = m_LinkLayers.get(systemId);
                if (findLayer(uuid, layerList) == null)
                {
                    processNewLinkLayer(systemId, uuid, pid, productType);
                }
                tmpUuidList.add(uuid);
            }
            else if (type.equals(CommType.PhysicalLink))
            {
                final List<CommsLayerBaseModel> layerList = m_PhysicalLayers.get(systemId);
                if (findLayer(uuid, layerList) == null) //if layer does not exist
                {
                    processNewPhysicalLink(systemId, uuid, pid, productType);
                }
                tmpUuidList.add(uuid); 
            }
        }   
        return tmpUuidList;
    }
/**
     * Helper method for merging data from the given FactoryObjectInfo list with the existing data
     * in the layer map.  Method iterates through the given info list, and adds new layers if they
     * are not found in the current list contained in the layer map.  Method also maintains
     * a list of the UUIDs contained in the given infoList to be used to remove any models
     * that should no longer exist in the layer map.  
     * @param type
     *      type of layer to which the FactoryObjectInfo list corresponds.
     * @param infoList
     *      list of information needed to create a new layer object
     * @param systemId
     *      ID of the controller to which the layers belong.
     * @return
     *      List of all UUIDs in the new list of layers
     */
Helper method for merging data from the given FactoryObjectInfo list with the existing data
in the layer map.  Method iterates through the given info list, and adds new layers if they
are not found in the current list contained in the layer map.  Method also maintains
a list of the UUIDs contained in the given infoList to be used to remove any models
that should no longer exist in the layer map.
@param type
type of layer to which the FactoryObjectInfo list corresponds.
@param infoList
list of information needed to create a new layer object
@param systemId
ID of the controller to which the layers belong.
@return
List of all UUIDs in the new list of layers
Helper method for merging data from the given FactoryObjectInfo list with the existing data in the layer map . Method iterates through the given info list and adds new layers if they are not found in the current list contained in the layer map . Method also maintains a list of the UUIDs contained in the given infoList to be used to remove any models that should no longer exist in the layer map . @param type type of layer to which the FactoryObjectInfo list corresponds . @param infoList list of information needed to create a new layer object @param systemId ID of the controller to which the layers belong . @return List of all UUIDs in the new list of layers
private synchronized List<UUID> mergeLayersHelper(final CommType type, final List<FactoryObjectInfo> infoList, 
            final int systemId)
    {        
        final List<UUID> tmpUuidList = new ArrayList<UUID>();
        for (FactoryObjectInfo info: infoList)
        {
            final UUID uuid = SharedMessageUtils.convertProtoUUIDtoUUID(info.getUuid());
            final String pid = info.getPid();
            final String productType = info.getProductType();
            if (type.equals(CommType.TransportLayer))
            {
                final List<CommsLayerBaseModel> layerList = m_TransportLayers.get(systemId);
                if (findLayer(uuid, layerList) == null) 
                {                    
                    processNewTransportLayer(systemId, uuid, pid, productType);
                }
                tmpUuidList.add(uuid);
            }
            else if (type.equals(CommType.Linklayer)) 
            {
                final List<CommsLayerLinkModelImpl> layerList = m_LinkLayers.get(systemId);
                if (findLayer(uuid, layerList) == null)
                {
                    processNewLinkLayer(systemId, uuid, pid, productType);
                }
                tmpUuidList.add(uuid);
            }
            else if (type.equals(CommType.PhysicalLink))
            {
                final List<CommsLayerBaseModel> layerList = m_PhysicalLayers.get(systemId);
                if (findLayer(uuid, layerList) == null) 
                {
                    processNewPhysicalLink(systemId, uuid, pid, productType);
                }
                tmpUuidList.add(uuid); 
            }
        }   
        return tmpUuidList;
    }
private synchronized List < UUID > mergeLayersHelper ( final CommType type , final List < FactoryObjectInfo > infoList , final int systemId ) { final List < UUID > tmpUuidList = new ArrayList < UUID > ( ) ; for ( FactoryObjectInfo info : infoList ) { final UUID uuid = SharedMessageUtils . convertProtoUUIDtoUUID ( info . getUuid ( ) ) ; final String pid = info . getPid ( ) ; final String productType = info . getProductType ( ) ; if ( type . equals ( CommType . TransportLayer ) ) { final List < CommsLayerBaseModel > layerList = m_TransportLayers . get ( systemId ) ; if ( findLayer ( uuid , layerList ) == null ) { processNewTransportLayer ( systemId , uuid , pid , productType ) ; } tmpUuidList . add ( uuid ) ; } else if ( type . equals ( CommType . Linklayer ) ) { final List < CommsLayerLinkModelImpl > layerList = m_LinkLayers . get ( systemId ) ; if ( findLayer ( uuid , layerList ) == null ) { processNewLinkLayer ( systemId , uuid , pid , productType ) ; } tmpUuidList . add ( uuid ) ; } else if ( type . equals ( CommType . PhysicalLink ) ) { final List < CommsLayerBaseModel > layerList = m_PhysicalLayers . get ( systemId ) ; if ( findLayer ( uuid , layerList ) == null ) { processNewPhysicalLink ( systemId , uuid , pid , productType ) ; } tmpUuidList . add ( uuid ) ; } } return tmpUuidList ; }
Helper method for merging data from the given FactoryObjectInfo list with the existing data
 in the layer map.
Helper method for merging data from the given FactoryObjectInfo list with the existing data in the layer map .
//if layer does not exist //if layer does not exist //if layer does not exist