Package org.rhq.enterprise.server.xmlschema.generated.configuration.instance

Examples of org.rhq.enterprise.server.xmlschema.generated.configuration.instance.ComplexValueSimpleDescriptor


        assertEquals(propDef.getLongDescription(), "prop descr", "Unexpected simple instance description");
        assertTrue(!propDef.isRequired(), "Unexpected simple instance required flag");

        assertEquals(listInstance.getValues().getComplexValue().size(), 2, "Unexpected number of list values");

        ComplexValueSimpleDescriptor value1 =
            (ComplexValueSimpleDescriptor) listInstance.getValues().getComplexValue().get(0).getValue();
        ComplexValueSimpleDescriptor value2 =
            (ComplexValueSimpleDescriptor) listInstance.getValues().getComplexValue().get(1).getValue();

        assertEquals(value1.getValue(), "value1");
        assertEquals(value2.getValue(), "value2");

        logInstance("List of simples", instance);
    }
View Full Code Here


            (ComplexValueMapDescriptor) listInstance.getValues().getComplexValue().get(1).getValue();

        assertEquals(map1.getComplexValue().size(), 2, "Unexpected number of map elements in the first map value.");
        assertEquals(map2.getComplexValue().size(), 2, "Unexpected number of map elements in the second map value.");

        ComplexValueSimpleDescriptor value11 = (ComplexValueSimpleDescriptor) map1.getComplexValue().get(0).getValue();
        ComplexValueSimpleDescriptor value12 = (ComplexValueSimpleDescriptor) map1.getComplexValue().get(1).getValue();
        ComplexValueSimpleDescriptor value21 = (ComplexValueSimpleDescriptor) map2.getComplexValue().get(0).getValue();
        ComplexValueSimpleDescriptor value22 = (ComplexValueSimpleDescriptor) map2.getComplexValue().get(1).getValue();

        assertEquals(value11.getPropertyName(), "prop1", "Unexpected name of the first property in the first map value");
        assertEquals(value11.getValue(), "value1", "Unexpected value of the first property in the first map value");
        assertEquals(value12.getPropertyName(), "prop2", "Unexpected name of the second property in the first map value");
        assertEquals(value12.getValue(), "value1", "Unexpected value of the second property in the first map value");
        assertEquals(value21.getPropertyName(), "prop1", "Unexpected name of the first property in the second map value");
        assertEquals(value21.getValue(), "value2", "Unexpected value of the first property in the second map value");
        assertEquals(value22.getPropertyName(), "prop2", "Unexpected name of the second property in the second map value");
        assertEquals(value22.getValue(), "value2", "Unexpected value of the second property in the second map value");

        logInstance("List of maps", instance);
    }
View Full Code Here

            throw new IllegalArgumentException("Unsupported property type to convert to a value descriptor: "
                + prop.getClass());
        }

        private static ComplexValueSimpleDescriptor convertSimpleValue(PropertySimple prop) {
            ComplexValueSimpleDescriptor ret = new ComplexValueSimpleDescriptor();
            ret.setPropertyName(prop.getName());
            ret.setValue(prop.getStringValue());

            return ret;
        }
View Full Code Here

TOP

Related Classes of org.rhq.enterprise.server.xmlschema.generated.configuration.instance.ComplexValueSimpleDescriptor

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.