Package org.rhq.core.clientapi.descriptor.configuration

Examples of org.rhq.core.clientapi.descriptor.configuration.SimpleProperty


            throw new IllegalArgumentException("Unsupported property definition type: " + def.getClass());
        }

        private static SimpleProperty convertSimple(PropertyDefinitionSimple def) {
            SimpleProperty ret = new SimpleProperty();
            setCommonProps(ret, def, false);
            ret.setDefaultValue(def.getDefaultValue());
            ret.setPropertyOptions(convert(def.getEnumeratedValues()));
            ret.setType(convert(def.getType()));
            ret.setUnits(convert(def.getUnits()));

            return ret;
        }
View Full Code Here


        assertEquals(listInstance.getName(), "list", "Unexpected list instance name");
        assertEquals(listInstance.getLongDescription(), "list descr", "Unexpected list instance description");
        assertTrue(listInstance.isRequired(), "Unexpected list instance required flag");

        SimpleProperty propDef = (SimpleProperty) listInstance.getConfigurationProperty().getValue();
        assertEquals(propDef.getName(), "prop", "Unexpected simple instance name");
        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();
View Full Code Here

TOP

Related Classes of org.rhq.core.clientapi.descriptor.configuration.SimpleProperty

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.