mil.dod.th.ose.gui.webapp/src/mil/dod/th/ose/gui/webapp/comms/CommsMgrImpl.java
private void processNewLayerHelper(final Event event)
    {
        // pull out necessary event properties
        final java.util.UUID uuid = java.util.UUID.fromString((String)event.
                getProperty(FactoryDescriptor.EVENT_PROP_OBJ_UUID));
        final String pid = (String)event.getProperty(FactoryDescriptor.EVENT_PROP_OBJ_PID);
        final int systemId = (Integer)event.getProperty(RemoteConstants.REMOTE_EVENT_PROP_CONTROLLER_ID);        
        final String baseType = (String)event.getProperty(FactoryDescriptor.EVENT_PROP_OBJ_BASE_TYPE);
        final String clazz = (String)event.getProperty(FactoryDescriptor.EVENT_PROP_OBJ_TYPE);
        
        //check type of layer added and verify that the layer does not already exist
        if (baseType.contains(TransportLayer.class.getSimpleName()) 
                && findLayer(uuid, m_TransportLayers.get(systemId)) == null)
        {
            addToMapIfNew(systemId, CommType.TransportLayer);
            processNewTransportLayer(systemId, uuid, pid, clazz);
        }
        else if (baseType.contains(LinkLayer.class.getSimpleName()) 
                && findLayer(uuid, m_LinkLayers.get(systemId)) == null)
        {
            addToMapIfNew(systemId, CommType.Linklayer);
            processNewLinkLayer(systemId, uuid, pid, clazz);
        }
        else if (baseType.contains(PhysicalLink.class.getSimpleName()) 
                &&  findLayer(uuid, m_PhysicalLayers.get(systemId)) == null)
        {
            addToMapIfNew(systemId, CommType.PhysicalLink);
            processNewPhysicalLink(systemId, uuid, pid, clazz);
        }
    }
/**
     * Helper method used to reduce the cyclomatic complexity of the caller method.  Specifically, method verifies
     * that layer does not already exist in map and proceeds to add it to the list of stacks.  If the type of the new
     * layer is either transport or link, a request for the child layer information is sent.
     * @param event
     *      properties of the remote event
     *      
     */
Helper method used to reduce the cyclomatic complexity of the caller method.  Specifically, method verifies
that layer does not already exist in map and proceeds to add it to the list of stacks.  If the type of the new
layer is either transport or link, a request for the child layer information is sent.
@param event
properties of the remote event
Helper method used to reduce the cyclomatic complexity of the caller method . Specifically method verifies that layer does not already exist in map and proceeds to add it to the list of stacks . If the type of the new layer is either transport or link a request for the child layer information is sent . @param event properties of the remote event
private void processNewLayerHelper(final Event event)
    {
        final java.util.UUID uuid = java.util.UUID.fromString((String)event.
                getProperty(FactoryDescriptor.EVENT_PROP_OBJ_UUID));
        final String pid = (String)event.getProperty(FactoryDescriptor.EVENT_PROP_OBJ_PID);
        final int systemId = (Integer)event.getProperty(RemoteConstants.REMOTE_EVENT_PROP_CONTROLLER_ID);        
        final String baseType = (String)event.getProperty(FactoryDescriptor.EVENT_PROP_OBJ_BASE_TYPE);
        final String clazz = (String)event.getProperty(FactoryDescriptor.EVENT_PROP_OBJ_TYPE);
        if (baseType.contains(TransportLayer.class.getSimpleName()) 
                && findLayer(uuid, m_TransportLayers.get(systemId)) == null)
        {
            addToMapIfNew(systemId, CommType.TransportLayer);
            processNewTransportLayer(systemId, uuid, pid, clazz);
        }
        else if (baseType.contains(LinkLayer.class.getSimpleName()) 
                && findLayer(uuid, m_LinkLayers.get(systemId)) == null)
        {
            addToMapIfNew(systemId, CommType.Linklayer);
            processNewLinkLayer(systemId, uuid, pid, clazz);
        }
        else if (baseType.contains(PhysicalLink.class.getSimpleName()) 
                &&  findLayer(uuid, m_PhysicalLayers.get(systemId)) == null)
        {
            addToMapIfNew(systemId, CommType.PhysicalLink);
            processNewPhysicalLink(systemId, uuid, pid, clazz);
        }
    }
private void processNewLayerHelper ( final Event event ) { final java . util . UUID uuid = java . util . UUID . fromString ( ( String ) event . getProperty ( FactoryDescriptor . EVENT_PROP_OBJ_UUID ) ) ; final String pid = ( String ) event . getProperty ( FactoryDescriptor . EVENT_PROP_OBJ_PID ) ; final int systemId = ( Integer ) event . getProperty ( RemoteConstants . REMOTE_EVENT_PROP_CONTROLLER_ID ) ; final String baseType = ( String ) event . getProperty ( FactoryDescriptor . EVENT_PROP_OBJ_BASE_TYPE ) ; final String clazz = ( String ) event . getProperty ( FactoryDescriptor . EVENT_PROP_OBJ_TYPE ) ; if ( baseType . contains ( TransportLayer . class . getSimpleName ( ) ) && findLayer ( uuid , m_TransportLayers . get ( systemId ) ) == null ) { addToMapIfNew ( systemId , CommType . TransportLayer ) ; processNewTransportLayer ( systemId , uuid , pid , clazz ) ; } else if ( baseType . contains ( LinkLayer . class . getSimpleName ( ) ) && findLayer ( uuid , m_LinkLayers . get ( systemId ) ) == null ) { addToMapIfNew ( systemId , CommType . Linklayer ) ; processNewLinkLayer ( systemId , uuid , pid , clazz ) ; } else if ( baseType . contains ( PhysicalLink . class . getSimpleName ( ) ) && findLayer ( uuid , m_PhysicalLayers . get ( systemId ) ) == null ) { addToMapIfNew ( systemId , CommType . PhysicalLink ) ; processNewPhysicalLink ( systemId , uuid , pid , clazz ) ; } }
Helper method used to reduce the cyclomatic complexity of the caller method.
Helper method used to reduce the cyclomatic complexity of the caller method .
// pull out necessary event properties //check type of layer added and verify that the layer does not already exist