mil.dod.th.ose.gui.webapp/src/mil/dod/th/ose/gui/webapp/asset/AssetCommandMgrImpl.java
private void tryAddOrUpdateAssetCommandModel(final int controllerId, final UUID uuid, 
            final CommandCapabilities capabilities)
    {
        final AssetSyncableCommandModel commandModel;
        final String exceptionMessage = String.format("Unable to display commands for asset with UUID: %s. See server " 
                + "log for further details.", uuid);
        try
        {
            if (m_AssetCommands.get(controllerId).containsKey(uuid))
            {
                //Attempt to update model if it already exists.
                m_AssetCommands.get(controllerId).get(uuid).updateCapabilities(capabilities);
            }
            else
            {
                commandModel = new AssetSyncableCommandModel(uuid, capabilities);
                m_AssetCommands.get(controllerId).put(uuid, commandModel);
            }
        }
        catch (final ClassNotFoundException exception)
        {
            m_GrowlUtil.createLocalFacesMessage(FacesMessage.SEVERITY_ERROR, EXCEPTION_TITLE, exceptionMessage, 
                    exception);
            return;
        }
        catch (final InstantiationException exception)
        {
            m_GrowlUtil.createLocalFacesMessage(FacesMessage.SEVERITY_ERROR, EXCEPTION_TITLE, exceptionMessage, 
                    exception);
            return;
        }
        catch (final IllegalAccessException exception)
        {
            m_GrowlUtil.createLocalFacesMessage(FacesMessage.SEVERITY_ERROR, EXCEPTION_TITLE, exceptionMessage, 
                    exception);
            return;
        }
    }
/**
     * Method that attempts to add or update an {@link AssetSyncableCommandModel} to the map for the specified asset.
     * 
     * @param controllerId
     *          ID of the controller where the asset that the model represents is located.
     * @param uuid
     *          {@link UUID} of the asset the model represents.
     * @param capabilities
     *          {@link CommandCapabilities} for the asset the model represents.
     */
Method that attempts to add or update an  AssetSyncableCommandModel to the map for the specified asset.

@param controllerId
ID of the controller where the asset that the model represents is located.
@param uuid
UUID of the asset the model represents.
@param capabilities
CommandCapabilities for the asset the model represents.
Method that attempts to add or update an AssetSyncableCommandModel to the map for the specified asset . @param controllerId ID of the controller where the asset that the model represents is located . @param uuid UUID of the asset the model represents . @param capabilities CommandCapabilities for the asset the model represents .
private void tryAddOrUpdateAssetCommandModel(final int controllerId, final UUID uuid, 
            final CommandCapabilities capabilities)
    {
        final AssetSyncableCommandModel commandModel;
        final String exceptionMessage = String.format("Unable to display commands for asset with UUID: %s. See server " 
                + "log for further details.", uuid);
        try
        {
            if (m_AssetCommands.get(controllerId).containsKey(uuid))
            {
                m_AssetCommands.get(controllerId).get(uuid).updateCapabilities(capabilities);
            }
            else
            {
                commandModel = new AssetSyncableCommandModel(uuid, capabilities);
                m_AssetCommands.get(controllerId).put(uuid, commandModel);
            }
        }
        catch (final ClassNotFoundException exception)
        {
            m_GrowlUtil.createLocalFacesMessage(FacesMessage.SEVERITY_ERROR, EXCEPTION_TITLE, exceptionMessage, 
                    exception);
            return;
        }
        catch (final InstantiationException exception)
        {
            m_GrowlUtil.createLocalFacesMessage(FacesMessage.SEVERITY_ERROR, EXCEPTION_TITLE, exceptionMessage, 
                    exception);
            return;
        }
        catch (final IllegalAccessException exception)
        {
            m_GrowlUtil.createLocalFacesMessage(FacesMessage.SEVERITY_ERROR, EXCEPTION_TITLE, exceptionMessage, 
                    exception);
            return;
        }
    }
private void tryAddOrUpdateAssetCommandModel ( final int controllerId , final UUID uuid , final CommandCapabilities capabilities ) { final AssetSyncableCommandModel commandModel ; final String exceptionMessage = String . format ( "Unable to display commands for asset with UUID: %s. See server " + "log for further details." , uuid ) ; try { if ( m_AssetCommands . get ( controllerId ) . containsKey ( uuid ) ) { m_AssetCommands . get ( controllerId ) . get ( uuid ) . updateCapabilities ( capabilities ) ; } else { commandModel = new AssetSyncableCommandModel ( uuid , capabilities ) ; m_AssetCommands . get ( controllerId ) . put ( uuid , commandModel ) ; } } catch ( final ClassNotFoundException exception ) { m_GrowlUtil . createLocalFacesMessage ( FacesMessage . SEVERITY_ERROR , EXCEPTION_TITLE , exceptionMessage , exception ) ; return ; } catch ( final InstantiationException exception ) { m_GrowlUtil . createLocalFacesMessage ( FacesMessage . SEVERITY_ERROR , EXCEPTION_TITLE , exceptionMessage , exception ) ; return ; } catch ( final IllegalAccessException exception ) { m_GrowlUtil . createLocalFacesMessage ( FacesMessage . SEVERITY_ERROR , EXCEPTION_TITLE , exceptionMessage , exception ) ; return ; } }
Method that attempts to add or update an {@link AssetSyncableCommandModel} to the map for the specified asset.
Method that attempts to add or update an { @link AssetSyncableCommandModel } to the map for the specified asset .
//Attempt to update model if it already exists.