Package org.rhq.core.domain.configuration

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


            if (ps.getStringValue().equals("example2.com"))
                count--;
        }
        assert count == 0 : "Did not find all needed aliases";

        Property notThere = config.get("notThere");
        assert notThere != null;
        assert ((PropertySimple) notThere).getStringValue() == null;

        PropertySimple property = (PropertySimple) config.get("rewrite");
        assert property != null;
View Full Code Here


        assert nameProperty != null;
        String stringValue = nameProperty.getStringValue();
        assert stringValue != null;
        assert stringValue.equals("default");

        Property criteria = config.get("criteria");
        assert criteria != null;
        PropertySimple critProp = (PropertySimple) criteria;
        stringValue = critProp.getStringValue();
        assert stringValue != null;
View Full Code Here

        assert nameProperty != null;
        String stringValue = nameProperty.getStringValue();
        assert stringValue != null;
        assert stringValue.equals("public");

        Property criteria = config.get("criteria");
        assert criteria != null;
        PropertySimple critProp = (PropertySimple) criteria;
        stringValue = critProp.getStringValue();
        assert stringValue != null;
        assert stringValue.equals("any-ipv4-address");
View Full Code Here

        ConfigurationLoadDelegate delegate = new ConfigurationLoadDelegate(definition, connection, null);
        Configuration config = delegate.loadResourceConfiguration();
        assert config != null;
        assert config.getAllProperties().size() == 8 : "Did not find 8 properties, but "
            + config.getAllProperties().size();
        Property prop = config.get("bean-validation-enabled");
        assert prop != null;
        PropertySimple ps = (PropertySimple) prop;
        assert ps.getBooleanValue();
        prop = config.get("cached-connection-manager-error");
        assert prop != null;
View Full Code Here

        Configuration config = delegate.loadResourceConfiguration();
        Collection<Property> properties = config.getProperties();

        assert properties.size() == 1;
        Iterator<Property> iterator = properties.iterator();
        Property p = iterator.next();
        assert p instanceof PropertyMap;
        PropertyMap pm = (PropertyMap) p;
        assert pm.getMap().size() == 2;
        PropertySimple ps = pm.getSimple("name:0");
        assert ps != null : "No property with name 'name:0' was found";
View Full Code Here

        Configuration config = delegate.loadResourceConfiguration();
        Collection<Property> properties = config.getProperties();

        assert properties.size() == 1;
        Iterator<Property> iterator = properties.iterator();
        Property p = iterator.next();
        assert p instanceof PropertyMap;
        PropertyMap pm = (PropertyMap) p;
        assert pm.getMap().size() == 1;
        PropertySimple ps = pm.getSimple("name:0");
        assert ps != null : "No property with name 'name:0' was found";
View Full Code Here

            aug = createAugeas(lens, from.getContents());
            String file = getFile(aug);
            for (String pathSuffix : nodePaths.get(from.getPath())) {
                String propName = ("/files" + from.getPath() + "/" + pathSuffix).substring(rootNodePath.length());
                String augeasPath = "/files" + file + "/" + pathSuffix;
                Property property = translator.createProperty(propName, augeasPath, aug);
                toUpdate.put(property);
            }
        } finally {
            if (aug != null) {
                aug.close();
View Full Code Here

        String nodeName = node.getNodeName();
        NamedNodeMap attrMap = node.getAttributes();
        Node attrNode = attrMap.getNamedItem(NAME_ATTRIBUTE);
        String propertyName = attrNode.getNodeValue();

        Property prop = null;

        if (nodeName.equals(SIMPLE_TAG_NAME)) {
            PropertySimple propertySimple = new PropertySimple(propertyName, null);
            String value = node.getTextContent();
            // Normalize "" to null.
View Full Code Here

                }
            }

        } else {
            // Normal cases
            Property prop = conf.get(propDefName);

            createWriteAttribute(cop, baseAddress, propDef, prop);
        }
    }
View Full Code Here

        for (Map.Entry<String, PropertyDefinition> entry : propertyDefinition.getMap().entrySet()) {
            PropertyDefinition def = entry.getValue();
            if (!def.getName().contains(":"))
                throw new IllegalArgumentException("Member names in a :collapsed map must end in :0 and :1");

            Property prop = property.get(def.getName());
            if (prop == null) {
                throw new IllegalArgumentException("Property " + def.getName() + " was null - must not happen");
            }

            PropertySimple ps = (PropertySimple) prop;
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.