Package org.rhq.core.domain.configuration

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


            log.error("GenericValue's value [" + genericValue.getValue() + "] is not a ManagedObject - not supported!");
            return;
        }
        ManagedObject managedObject = (ManagedObject) genericValue.getValue();
        for (String propName : propMap.getMap().keySet()) {
            Property mapMemberProp = propMap.get(propName);
            ManagedProperty managedProp = managedObject.getProperty(propName);
            MetaType metaType = managedProp.getMetaType();
            PropertyAdapter propertyAdapter = PropertyAdapterFactory.getPropertyAdapter(metaType);
            PropertyDefinition mapMemberPropDef = propDefMap.get(propName);
            if (managedProp.getValue() == null) {
View Full Code Here


        PropertyDefinitionMap propDefMap) {
        CompositeValueSupport compositeValue = (CompositeValueSupport) metaValue;
        for (String mapMemberPropName : propMap.getMap().keySet()) {
            if (mapMemberPropName.equals("name"))
                continue;
            Property mapMemberProp = propMap.get(mapMemberPropName);
            PropertyDefinition mapMemberPropDef = propDefMap.get(mapMemberPropName);
            MetaType mapMemberMetaType = compositeValue.getMetaType().getType(mapMemberPropName);
            if (mapMemberMetaType == null) {
                // this will occur when new map properties are added since they are not present
                // in the original metaValue which we are using
View Full Code Here

    protected void loadProperty(PropertyDefinition propDef, AbstractPropertyMap parentPropMap, Augeas augeas,
        AugeasNode parentNode) {
        String propName = getAugeasPathRelativeToParent(propDef, parentNode, augeas);
        AugeasNode node = (propName.equals(".")) ? parentNode : new AugeasNode(parentNode, propName);
        Property prop;
        if (propDef instanceof PropertyDefinitionSimple) {
            prop = createPropertySimple((PropertyDefinitionSimple) propDef, augeas, node);
        } else if (propDef instanceof PropertyDefinitionMap) {
            prop = createPropertyMap((PropertyDefinitionMap) propDef, augeas, node);
        } else if (propDef instanceof PropertyDefinitionList) {
View Full Code Here

        return new AugeasNode(listNode, getAugeasPathRelativeToParent(listMemberPropDefMap, listNode, getAugeas())
            + "[" + listIndex + "]");
    }

    private boolean isPropertyDefined(PropertyDefinition propDef, AbstractPropertyMap parentPropMap) {
        Property prop = parentPropMap.get(propDef.getName());
        if (prop == null) {
            return false;
        } else {
            return (!(prop instanceof PropertySimple) || ((PropertySimple) prop).getStringValue() != null);
        }
View Full Code Here

    }

    @Override
    protected Configuration getTestResourceConfiguration() {
        Configuration resourceConfig = new Configuration();
        Property property = new PropertySimple("name", getDestinationName());
        resourceConfig.put(property);
        property = new PropertySimple("JNDIName", getDestinationJndi());
        resourceConfig.put(property);

        return resourceConfig;
View Full Code Here

           
            PropertyMap bindingMap = new PropertyMap(BINDING_PROPERTY);
            resultingBindings.add(bindingMap);
           
            for (PropertyDefinition def : Util.BINDING_SET_OVERRIDE_PROPERTIES) {
                Property equivalent = standardBinding.get(def.propertyName);
                if (equivalent != null) {
                    bindingMap.put(equivalent);
                }
            }
           
View Full Code Here

        serverUrl = getUrl(serverConfig, binaryInfo.getVersion());
        vhostsGlobInclude = scanForGlobInclude(serverConfig);

        if (serverUrl != null) {
            Property urlProp = new PropertySimple(ApacheServerComponent.PLUGIN_CONFIG_PROP_URL, serverUrl);
            pluginConfig.put(urlProp);
        }

        if (vhostsGlobInclude != null) {
            pluginConfig.put(new PropertySimple(ApacheServerComponent.PLUGIN_CONFIG_PROP_VHOST_FILES_MASK,
View Full Code Here

                o = objects.get(tmp);
            } else {
                o = objects.get(key);
            }

            Property property;
            if (propDef instanceof PropertyDefinitionSimple)
                property = loadHandlePropertySimple((PropertyDefinitionSimple) propDef, o);
            else if (propDef instanceof PropertyDefinitionList)
                property = loadHandlePropertyList((PropertyDefinitionList) propDef, o);
            else if (propDef instanceof PropertyDefinitionMap)
View Full Code Here

        return resourceConfig;
    }

    public Property loadProperty(PropertyDefinition propDef, AugeasNode parentNode) throws AugeasRhqException {

        Property prop;
        if (propDef instanceof PropertyDefinitionSimple) {
            prop = createPropertySimple((PropertyDefinitionSimple) propDef, parentNode);
        } else if (propDef instanceof PropertyDefinitionMap) {
            prop = createPropertyMap((PropertyDefinitionMap) propDef, parentNode);
        } else if (propDef instanceof PropertyDefinitionList) {
View Full Code Here

        Configuration config = bundleDeployment.getConfiguration();
        if (config != null) {
            Map<String, Property> allProperties = config.getAllProperties();
            for (Map.Entry<String, Property> entry : allProperties.entrySet()) {
                String name = entry.getKey();
                Property prop = entry.getValue();
                String value;
                if (prop instanceof PropertySimple) {
                    value = ((PropertySimple) prop).getStringValue();
                } else {
                    // for now, just skip all property lists and maps, just assume we are getting simples
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.