mil.dod.th.ose.gui.webapp/src/mil/dod/th/ose/gui/webapp/asset/AssetTypesMgrImpl.java
private synchronized void eventGetAssetTypesResponseData(final GetAssetTypesResponseData message, 
        final int systemId)
    {
        final GetAssetTypesResponseData response = message;
        
        final List<String> productTypes = response.getProductTypeList();
        
        for (String productType : productTypes)
        {
            final AssetFactoryModel model = new AssetFactoryModel(productType, m_AssetImageInterface);
            tryAddAssetFactoryModel(model, systemId);
        }

        //check that the lookup of factories does not contain factories that are no longer associated with the 
        //given controller
        
        //list to hold models that need to be removed
        final List<AssetFactoryModel> models = new ArrayList<AssetFactoryModel>();
        for (AssetFactoryModel model : getAssetFactoriesForControllerAsync(systemId))
        {
            if (!productTypes.contains(model.getFullyQualifiedAssetType()))
            {
                models.add(model);
            }
        }

        //remove models that are no longer associated with the system id
        for (AssetFactoryModel model : models)
        {
            m_AssetFactories.get(systemId).remove(model);
        }
        
        //Build the asset types updated event.
        final Map<String, Object> props = new HashMap<String, Object>();
        final Event assetTypesUpdated = new Event(TOPIC_ASSET_TYPES_UPDATED, props);
        //Post the asset status updated event
        m_EventAdmin.postEvent(assetTypesUpdated);
    }
/**
     * Event response handling for the get asset factories request.
     * @param message
     *     the message that contains the response information
     * @param systemId
     *     the system id from which the response message originated
     */
Event response handling for the get asset factories request.
@param message
the message that contains the response information
@param systemId
the system id from which the response message originated
Event response handling for the get asset factories request . @param message the message that contains the response information @param systemId the system id from which the response message originated
private synchronized void eventGetAssetTypesResponseData(final GetAssetTypesResponseData message, 
        final int systemId)
    {
        final GetAssetTypesResponseData response = message;
        final List<String> productTypes = response.getProductTypeList();
        for (String productType : productTypes)
        {
            final AssetFactoryModel model = new AssetFactoryModel(productType, m_AssetImageInterface);
            tryAddAssetFactoryModel(model, systemId);
        }
        final List<AssetFactoryModel> models = new ArrayList<AssetFactoryModel>();
        for (AssetFactoryModel model : getAssetFactoriesForControllerAsync(systemId))
        {
            if (!productTypes.contains(model.getFullyQualifiedAssetType()))
            {
                models.add(model);
            }
        }
        for (AssetFactoryModel model : models)
        {
            m_AssetFactories.get(systemId).remove(model);
        }
        final Map<String, Object> props = new HashMap<String, Object>();
        final Event assetTypesUpdated = new Event(TOPIC_ASSET_TYPES_UPDATED, props);
        m_EventAdmin.postEvent(assetTypesUpdated);
    }
private synchronized void eventGetAssetTypesResponseData ( final GetAssetTypesResponseData message , final int systemId ) { final GetAssetTypesResponseData response = message ; final List < String > productTypes = response . getProductTypeList ( ) ; for ( String productType : productTypes ) { final AssetFactoryModel model = new AssetFactoryModel ( productType , m_AssetImageInterface ) ; tryAddAssetFactoryModel ( model , systemId ) ; } final List < AssetFactoryModel > models = new ArrayList < AssetFactoryModel > ( ) ; for ( AssetFactoryModel model : getAssetFactoriesForControllerAsync ( systemId ) ) { if ( ! productTypes . contains ( model . getFullyQualifiedAssetType ( ) ) ) { models . add ( model ) ; } } for ( AssetFactoryModel model : models ) { m_AssetFactories . get ( systemId ) . remove ( model ) ; } final Map < String , Object > props = new HashMap < String , Object > ( ) ; final Event assetTypesUpdated = new Event ( TOPIC_ASSET_TYPES_UPDATED , props ) ; m_EventAdmin . postEvent ( assetTypesUpdated ) ; }
Event response handling for the get asset factories request.
Event response handling for the get asset factories request .
//check that the lookup of factories does not contain factories that are no longer associated with the  //given controller //list to hold models that need to be removed //remove models that are no longer associated with the system id //Build the asset types updated event. //Post the asset status updated event