Package com.volantis.mcs.devices.policy.types

Examples of com.volantis.mcs.devices.policy.types.StructurePolicyType


                    connection, "StructurePolicy", locale);
            policyType = policyDescriptor.getPolicyType();
            assertNotNull("Policy Descriptor should be found", policyDescriptor);
            assertTrue("Type should match: " + policyType,
                    policyType instanceof StructurePolicyType);
            StructurePolicyType structureType =
                    (StructurePolicyType)policyType;

            assertTrue("Should contain key: " + "TestFieldname",
                    structureType.getFieldTypes().containsKey("TestFieldname"));
            policyType = (PolicyType)structureType.getFieldTypes().get("TestFieldname");
            assertTrue("Type should match: " + policyType,
                    policyType instanceof BooleanPolicyType);

            // Test the retrieval of a policy descriptor from VMTYPES_SET
            id = populateWithOrderedSet(id);
View Full Code Here


        // the detail of the type instance, if necessary.
        if (policyType instanceof SetPolicyType) {
            SetPolicyType set = (SetPolicyType) policyType;
            addTypeInstanceSet(connection, typeInstanceId, set);
        } else if (policyType instanceof StructurePolicyType) {
            StructurePolicyType structure = (StructurePolicyType) policyType;
            addTypeInstanceStructure(connection, typeInstanceId,
                    structure);
        } else if (policyType instanceof RangePolicyType) {
            RangePolicyType range = (RangePolicyType) policyType;
            insertTypeInstanceRange(connection, typeInstanceId,
View Full Code Here

                        " <big> element");
                assertEquals("Category should match (structure)",
                        descriptor.getCategoryName(),
                        "protocol");
                // Ensure the type is of the correct type (try a cast!)
                StructurePolicyType structureType =
                        (StructurePolicyType) descriptor.getPolicyType();

                Map fields = structureType.getFieldTypes();
                Set keys = fields.keySet();
                String[] expectedKeys = new String[]{
                    "enable", "prefix", "suffix", "altTag"
                };
                size = expectedKeys.length;
View Full Code Here

TOP

Related Classes of com.volantis.mcs.devices.policy.types.StructurePolicyType

Copyright © 2018 www.massapicom. 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.