Package org.rhq.core.domain.configuration

Examples of org.rhq.core.domain.configuration.Property


        pl = (PropertyList) configuration.get("*");
        assert pl.getList().size() == count + 1;

        Iterator<Property> iter = pl.getList().iterator();
        while (iter.hasNext()) {
            Property prop = iter.next();
            PropertyMap pm = (PropertyMap) prop;
            if (pm.getSimpleValue("name", "xxx").equals("bla3")) {
                iter.remove();
                break;
            }
View Full Code Here


        Collection<String> names = config.getNames();

        for (String name : names)
        {
            Property property = config.get(name);

            if (property instanceof PropertySimple)
            {
                PropertySimple simple = (PropertySimple) property;
                LOG.info(prefix + "Property: " + name + " -> " + simple.getStringValue());
View Full Code Here

                        report.getConfiguration().remove(propDef.getName());
                    } else {
                        // BZ 1033404, because EAP sometimes has issues setting an attribute undefined (i.e. null),
                        // don't reset to null if it's already undefined.
                        Object current = currentAttributeList.get(name);
                        Property update = report.getConfiguration().getAllProperties().get(propDef.getName());
                        if ((null == current && isUndefined(update))) {
                            propDefs.remove(propDef.getName());
                            report.getConfiguration().remove(propDef.getName());
                        }
                    }
View Full Code Here

        PropertyList entryList = (PropertyList) allProperties.iterator().next();

        for (Property property : entryList.getList()) {
            PropertyMap entry = (PropertyMap) property;

            Property typeProperty = entry.get("type");
            Property uriProperty = entry.get("uri");
            Property distributionProperty = entry.get("distribution");

            assert typeProperty != null : "Type was null in entry";
            assert uriProperty != null : "URI was null in entry";
            assert distributionProperty != null : "Distribution was null in entry";
View Full Code Here

        Configuration resourceConfig) throws AugeasRhqException {

        Collection<PropertyDefinition> propDefs = resourceConfigDef.getPropertyDefinitions().values();

        for (PropertyDefinition propDef : propDefs) {
            Property prop = resourceConfig.get(propDef.getName());
            updateProperty(propDef, prop, node, 0);
        }
    }
View Full Code Here

            if (propertyAdapter == null) {
                LOG.error("Unable to find a PropertyAdapter for ManagedProperty '" + propName + "' with MetaType ["
                    + metaValue.getMetaType() + "] for ResourceType '" + resourceType.getName() + "'.");
                continue;
            }
            Property property;
            try {
                property = propertyAdapter.convertToProperty(metaValue, propertyDefinition);
            } catch (RuntimeException e) {
                throw new RuntimeException("Failed to convert managed property " + managedProperty
                    + " to RHQ property of type " + propertyDefinition + ".", e);
View Full Code Here

        Map<String, PropertyDefinition> paramPropDefs = paramsConfigDef.getPropertyDefinitions();
        MetaValue[] paramMetaValues = new MetaValue[managedParams.length];
        for (int i = 0; i < managedParams.length; i++) {
            ManagedParameter managedParam = managedParams[i];
            String paramName = managedParam.getName();
            Property paramProp = parameters.get(paramName);
            PropertyDefinition paramPropDef = paramPropDefs.get(paramName);
            MetaType metaType = managedParam.getMetaType();
            PropertyAdapter propertyAdapter = PropertyAdapterFactory.getPropertyAdapter(metaType);
            LOG.trace("Converting RHQ operation param property " + paramProp + " with definition " + paramPropDef
                + " to MetaValue of type " + metaType + "...");
View Full Code Here

                LOG.debug("Profile Service Error: Result type (" + resultMetaType + ") of [" + operation.getName()
                    + "] ManagedOperation does not match the type of the value returned by invoke() ("
                    + resultMetaValue + ").");

            PropertyAdapter propertyAdapter = PropertyAdapterFactory.getPropertyAdapter(resultMetaValue);
            Property resultProp = propertyAdapter.convertToProperty(resultMetaValue, resultPropDef);
            complexResults.put(resultProp);
        }
    }
View Full Code Here

        PropertyList entryList = (PropertyList) propertyIterator.next();

        for (Property property : entryList.getList()) {
            PropertyMap entry = (PropertyMap) property;

            Property titleProperty = entry.get("title");
            Property rootProperty = entry.get("root");
            Property kernelProperty = entry.get("kernel");
            Property initrdProperty = entry.get("initrd");

            assert titleProperty != null : "Title was null in entry";
            assert rootProperty != null : "Root was null in entry";
            assert kernelProperty != null : "Kernel was null in entry";
            assert initrdProperty != null : "Initrd was null in entry";
View Full Code Here

        List<Property> mapPropertiesInOrder = new ArrayList<Property>(map.getMap().values());
       
        Assert.assertEquals(mapPropertiesInOrder.size(), originalMapPropertiesInOrder.size(), "Different number of properties in the map after obfuscation");
       
        for(int i = 0; i < mapPropertiesInOrder.size(); ++i) {
            Property originalProp = originalMapPropertiesInOrder.get(i);
            Property prop = mapPropertiesInOrder.get(i);
           
            Assert.assertEquals(prop.getName(), originalProp.getName(), "Properties seem to be mixed up after obfuscation");
        }
    }
View Full Code Here

TOP

Related Classes of org.rhq.core.domain.configuration.Property

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.