mil.dod.th.ose.integration.commons/src/mil/dod/th/ose/integration/commons/AssetUtils.java
public static void activateAsset(BundleContext context, Asset asset, int timeoutSecs)
    {
        //create a syncer that will listen for the activated event
        final EventHandlerSyncer actSyncer = new EventHandlerSyncer(context, Asset.TOPIC_ACTIVATION_COMPLETE, 
                String.format("(%s=%s)", FactoryDescriptor.EVENT_PROP_OBJ_UUID, asset.getUuid()));
        
        //activate
        asset.activateAsync();
        
        //listen
        actSyncer.waitForEvent(timeoutSecs);
        
        assertThat(asset.getActiveStatus(), is(Asset.AssetActiveStatus.ACTIVATED));
    }
/**
     * Activate the given asset.
     * @param asset
     *      the asset to activate
     * @param timeoutSecs
     *      how long to wait for the asset to activate 
     */
Activate the given asset.
@param asset
the asset to activate
@param timeoutSecs
how long to wait for the asset to activate
Activate the given asset . @param asset the asset to activate @param timeoutSecs how long to wait for the asset to activate
public static void activateAsset(BundleContext context, Asset asset, int timeoutSecs)
    {
        final EventHandlerSyncer actSyncer = new EventHandlerSyncer(context, Asset.TOPIC_ACTIVATION_COMPLETE, 
                String.format("(%s=%s)", FactoryDescriptor.EVENT_PROP_OBJ_UUID, asset.getUuid()));
        asset.activateAsync();
        actSyncer.waitForEvent(timeoutSecs);
        assertThat(asset.getActiveStatus(), is(Asset.AssetActiveStatus.ACTIVATED));
    }
public static void activateAsset ( BundleContext context , Asset asset , int timeoutSecs ) { final EventHandlerSyncer actSyncer = new EventHandlerSyncer ( context , Asset . TOPIC_ACTIVATION_COMPLETE , String . format ( "(%s=%s)" , FactoryDescriptor . EVENT_PROP_OBJ_UUID , asset . getUuid ( ) ) ) ; asset . activateAsync ( ) ; actSyncer . waitForEvent ( timeoutSecs ) ; assertThat ( asset . getActiveStatus ( ) , is ( Asset . AssetActiveStatus . ACTIVATED ) ) ; }
Activate the given asset.
Activate the given asset .
//create a syncer that will listen for the activated event //activate //listen