Examples of TargetedSelection


Examples of com.volantis.mcs.policies.variants.selection.TargetedSelection

        // structures.
        while (variants.hasNext()) {
            Variant variant = (Variant) variants.next();
            Selection selection = variant.getSelection();
            if (selection instanceof TargetedSelection) {
                TargetedSelection targetedSelection =
                        (TargetedSelection) selection;

                // Only generate categories if they are supported by this
                // policy.
                if (hasCategories) {
                    List categories = targetedSelection.getCategoryReferences();
                    if (categories != null && !categories.isEmpty()) {
                        category2Variant =
                                targetVariantAtCategories(variant, categories,
                                        category2Variant);
                    }
                }

                List devices = targetedSelection.getDeviceReferences();
                if (devices != null && !devices.isEmpty()) {
                    device2Variant = targetVariantAtDevices(variant, devices,
                            device2Variant);
                }
            } else if (selection instanceof DefaultSelection) {
View Full Code Here

Examples of com.volantis.mcs.policies.variants.selection.TargetedSelection

                FileImageAssetFactory factory = new FileImageAssetFactory();
                Variant variant = factory.createDeviceImageVariant(
                        temporaryFile, assetGroup, deviceName).getVariant();

                // Test selection.
                TargetedSelection selection = (TargetedSelection)
                        variant.getSelection();
                List devices = selection.getDeviceReferences();
                assertEquals("Device List Size", 1, devices.size());
                assertEquals("Device", deviceName,
                        ((DeviceReference) devices.get(0)).getDeviceName());

                // Test meta data.
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.