mil.dod.th.ose.integration/src/mil/dod/th/ose/controller/integration/utils/AssetTestUtils.java
public static void deleteAsset(Asset asset)    
    {
        //Wait for asset to finish activating
        EventHandlerSyncer activationListener = new EventHandlerSyncer(Asset.TOPIC_ACTIVATION_COMPLETE,
                String.format("(%s=%s)", FactoryDescriptor.EVENT_PROP_OBJ_UUID, asset.getUuid().toString()));

        if (asset.getActiveStatus() == AssetActiveStatus.ACTIVATING)
        {              
            activationListener.waitForEvent(10);
        }

        if (asset.getActiveStatus() == AssetActiveStatus.ACTIVATED)
        {
            deactivateAsset(asset);
        }
        
        asset.delete();
    }
/**
     * Deletes all assets from the controller. Try to deactivate the asset first if it is currently activating or 
     * activated.
     */
Deletes all assets from the controller. Try to deactivate the asset first if it is currently activating or
activated.
Deletes all assets from the controller . Try to deactivate the asset first if it is currently activating or activated .
public static void deleteAsset(Asset asset)    
    {
        EventHandlerSyncer activationListener = new EventHandlerSyncer(Asset.TOPIC_ACTIVATION_COMPLETE,
                String.format("(%s=%s)", FactoryDescriptor.EVENT_PROP_OBJ_UUID, asset.getUuid().toString()));
        if (asset.getActiveStatus() == AssetActiveStatus.ACTIVATING)
        {              
            activationListener.waitForEvent(10);
        }
        if (asset.getActiveStatus() == AssetActiveStatus.ACTIVATED)
        {
            deactivateAsset(asset);
        }
        asset.delete();
    }
public static void deleteAsset ( Asset asset ) { EventHandlerSyncer activationListener = new EventHandlerSyncer ( Asset . TOPIC_ACTIVATION_COMPLETE , String . format ( "(%s=%s)" , FactoryDescriptor . EVENT_PROP_OBJ_UUID , asset . getUuid ( ) . toString ( ) ) ) ; if ( asset . getActiveStatus ( ) == AssetActiveStatus . ACTIVATING ) { activationListener . waitForEvent ( 10 ) ; } if ( asset . getActiveStatus ( ) == AssetActiveStatus . ACTIVATED ) { deactivateAsset ( asset ) ; } asset . delete ( ) ; }
Deletes all assets from the controller.
Deletes all assets from the controller .
//Wait for asset to finish activating