mil.dod.th.ose.gui.webapp/src/mil/dod/th/ose/gui/webapp/asset/AssetMgrImpl.java
private synchronized void processGetAssetResponse(final Message assetMessage, final int systemId)
    {
        final GetAssetsResponseData response = (GetAssetsResponseData) assetMessage;
        final List<UUID> convUuids = new ArrayList<UUID>();

        //first add any new assets
        for (FactoryObjectInfo info : response.getAssetInfoList())
        {
            final SharedMessages.UUID protoUUID = info.getUuid();
            final UUID convertedUuid = SharedMessageUtils.convertProtoUUIDtoUUID(protoUUID);
            convUuids.add(convertedUuid);
            final AssetModel model = new AssetModel(systemId, convertedUuid, info.getPid(), info.getProductType(), 
                    this, configWrapper, assetTypesMgr, m_AssetImageInterface);
            
            //request information only if the asset is new
            if (tryAddAssetModel(model))
            {
                //send requests for capabilities etc.
                sendRequestsForNewAssetInformation(protoUUID, systemId);
            }
        }

        //remove any assets that are no longer connected with the particular system
        for (AssetModel oldModel : retrieveAssetModelList(systemId))
        {
            if (!convUuids.contains(oldModel.getUuid()))
            {
                m_Assets.get(systemId).remove(oldModel);
            }
        }
    }
/**
     * Process remote message that contains assets from a single controller.
     * @param assetMessage
     *    the asset message that contains assets from the specified asset
     * @param systemId
     *    the system ID that the message came from
     */
Process remote message that contains assets from a single controller.
@param assetMessage
the asset message that contains assets from the specified asset
@param systemId
the system ID that the message came from
Process remote message that contains assets from a single controller . @param assetMessage the asset message that contains assets from the specified asset @param systemId the system ID that the message came from
private synchronized void processGetAssetResponse(final Message assetMessage, final int systemId)
    {
        final GetAssetsResponseData response = (GetAssetsResponseData) assetMessage;
        final List<UUID> convUuids = new ArrayList<UUID>();
        for (FactoryObjectInfo info : response.getAssetInfoList())
        {
            final SharedMessages.UUID protoUUID = info.getUuid();
            final UUID convertedUuid = SharedMessageUtils.convertProtoUUIDtoUUID(protoUUID);
            convUuids.add(convertedUuid);
            final AssetModel model = new AssetModel(systemId, convertedUuid, info.getPid(), info.getProductType(), 
                    this, configWrapper, assetTypesMgr, m_AssetImageInterface);
            if (tryAddAssetModel(model))
            {
                sendRequestsForNewAssetInformation(protoUUID, systemId);
            }
        }
        for (AssetModel oldModel : retrieveAssetModelList(systemId))
        {
            if (!convUuids.contains(oldModel.getUuid()))
            {
                m_Assets.get(systemId).remove(oldModel);
            }
        }
    }
private synchronized void processGetAssetResponse ( final Message assetMessage , final int systemId ) { final GetAssetsResponseData response = ( GetAssetsResponseData ) assetMessage ; final List < UUID > convUuids = new ArrayList < UUID > ( ) ; for ( FactoryObjectInfo info : response . getAssetInfoList ( ) ) { final SharedMessages . UUID protoUUID = info . getUuid ( ) ; final UUID convertedUuid = SharedMessageUtils . convertProtoUUIDtoUUID ( protoUUID ) ; convUuids . add ( convertedUuid ) ; final AssetModel model = new AssetModel ( systemId , convertedUuid , info . getPid ( ) , info . getProductType ( ) , this , configWrapper , assetTypesMgr , m_AssetImageInterface ) ; if ( tryAddAssetModel ( model ) ) { sendRequestsForNewAssetInformation ( protoUUID , systemId ) ; } } for ( AssetModel oldModel : retrieveAssetModelList ( systemId ) ) { if ( ! convUuids . contains ( oldModel . getUuid ( ) ) ) { m_Assets . get ( systemId ) . remove ( oldModel ) ; } } }
Process remote message that contains assets from a single controller.
Process remote message that contains assets from a single controller .
//first add any new assets //request information only if the asset is new //send requests for capabilities etc. //remove any assets that are no longer connected with the particular system