Package org.rhq.plugins.jbossas5.connection

Examples of org.rhq.plugins.jbossas5.connection.ProfileServiceConnectionProvider


        for (String mapMemberPropName : mapMemberPropNames)
        {
            Property mapMemberProp = propMap.get(mapMemberPropName);
            MetaValue mapMemberMetaValue = compositeValue.get(mapMemberPropName);
            MetaType mapMemberMetaType = compositeValue.getMetaType().getType(mapMemberPropName);
            PropertyAdapter propertyAdapter = PropertyAdapterFactory.getPropertyAdapter(mapMemberMetaType);
            PropertyDefinition mapMemberPropDef = propDefMap.get(mapMemberPropName);
            if (mapMemberProp == null)
            {
                if (mapMemberPropDef != null)
                    mapMemberProp = propertyAdapter.convertToProperty(mapMemberMetaValue, mapMemberPropDef);
                else
                {
                    // If the member prop has no associated prop def, this is an "open map".
                    if (!mapMemberMetaType.isSimple() && !mapMemberMetaType.isEnum())
                    {
                        log.debug("Map member prop [" + mapMemberMetaType + "] is not a simple type - skipping...");
                        continue;
                    }
                    // Create a PropertySimple and populate it.
                    mapMemberProp = new PropertySimple(mapMemberPropName, null);
                    // NOTE: It's ok that the propDef is null - PropertySimple*Adapter.populatePropertyFromMetaValue()
                    //       doesn't use it for anything.
                    propertyAdapter.populatePropertyFromMetaValue(mapMemberProp, mapMemberMetaValue, mapMemberPropDef);
                }
                propMap.put(mapMemberProp);
            }
        }
    }
View Full Code Here


        for (PropertyDefinition propertyDefinition : managedPropertyGroup) {
            String propertyKey = propertyDefinition.getName();
            Property property = pluginConfiguration.get(propertyKey);
            ManagedProperty managedProperty = managedProperties.get(propertyKey);
            if (managedProperty != null && property != null) {
                PropertyAdapter propertyAdapter = PropertyAdapterFactory.getPropertyAdapter(managedProperty
                    .getMetaType());
                propertyAdapter.populateMetaValueFromProperty(property, managedProperty.getValue(), propertyDefinition);
            }
        }
    }
View Full Code Here

        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) {
                MetaValue managedPropMetaValue = propertyAdapter.convertToMetaValue(mapMemberProp, mapMemberPropDef,
                    metaType);
                managedProp.setValue(managedPropMetaValue);
            } else {
                MetaValue managedPropMetaValue = (MetaValue) managedProp.getValue();
                propertyAdapter.populateMetaValueFromProperty(mapMemberProp, managedPropMetaValue, mapMemberPropDef);
            }
        }
    }
View Full Code Here

            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
                mapMemberMetaType = SimpleMetaType.STRING;
            }
            PropertyAdapter adapter = PropertyAdapterFactory.getPropertyAdapter(mapMemberMetaType);
            MetaValue mapMemberMetaValue = adapter.convertToMetaValue(mapMemberProp, mapMemberPropDef,
                mapMemberMetaType);
            compositeValue.set(mapMemberPropName, mapMemberMetaValue);
        }
    }
View Full Code Here

            ManagementView managementView = getConnection().getManagementView();
            ManagedComponent managedComponent = managementView.getComponent(componentName, componentType);
            Map<String, ManagedProperty> managedProperties = managedComponent.getProperties();
            ManagedProperty managedProperty = managedProperties.get("security-domain");
            MetaValue metaValue = managedProperty.getValue();
            PropertyAdapter propertyAdapter = PropertyAdapterFactory.getPropertyAdapter(metaValue);
            propertyAdapter.populateMetaValueFromProperty(resourceConfiguration.get("security-domain"), metaValue,
                    resourceConfigurationDefinition.get("security-domain"));
            managementView.updateComponent(managedComponent);
            managementView.load();
        } catch (Exception e) {
            report.setErrorMessage("Resource was created but an error occured while updating security-domain property");
View Full Code Here

        {
            propertyAdapter = new PropertyListToCollectionValueAdapter();
        }
        else if (metaType.isArray())
        {
            propertyAdapter = new PropertyListToArrayValueAdapter();
        }
        else if (metaType.isEnum())
        {
            propertyAdapter = new PropertySimpleToEnumValueAdapter();
        }
View Full Code Here

        {
            propertyAdapter = new PropertyMapToTableValueAdapter();
        }
        else if (metaType.isCollection())
        {
            propertyAdapter = new PropertyListToCollectionValueAdapter();
        }
        else if (metaType.isArray())
        {
            propertyAdapter = new PropertyListToArrayValueAdapter();
        }
View Full Code Here

        else if (metaType.isComposite())
        {
            if (metaType instanceof MapCompositeMetaType)
                propertyAdapter = new PropertyMapToMapCompositeValueSupportAdapter();
            else
                propertyAdapter = new PropertyMapToCompositeValueSupportAdapter();
        }
        else if (metaType.isTable())
        {
            propertyAdapter = new PropertyMapToTableValueAdapter();
        }
View Full Code Here

        {
            propertyAdapter = new PropertySimpleToSimpleValueAdapter();
        }
        else if (metaType.isGeneric())
        {
            propertyAdapter = new PropertyMapToGenericValueAdapter();
        }
        else if (metaType.isComposite())
        {
            if (metaType instanceof MapCompositeMetaType)
                propertyAdapter = new PropertyMapToMapCompositeValueSupportAdapter();
View Full Code Here

        PropertyDefinitionList propertyDefinitionList) {
        CompositeValue compositeValue = (CompositeValue) metaValue;
        CompositeMetaType compositeMetaType = compositeValue.getMetaType();
        PropertyDefinitionMap memberPropertyDefinitionMap = (PropertyDefinitionMap) propertyDefinitionList
            .getMemberDefinition();
        PropertyMapToMapCompositeValueSupportAdapter mapToMapCompositeValueAdapter = new PropertyMapToMapCompositeValueSupportAdapter();
        for (String memberName : compositeMetaType.itemSet()) {
            MetaValue memberMetaValue = compositeValue.get(memberName);
            PropertyMap memberPropertyMap = mapToMapCompositeValueAdapter.convertToProperty(memberMetaValue,
                memberPropertyDefinitionMap);
            memberPropertyMap.put(new PropertySimple("name", memberName)); // add a simple for the role name to the map
            propertyList.add(memberPropertyMap);
        }
    }
View Full Code Here

TOP

Related Classes of org.rhq.plugins.jbossas5.connection.ProfileServiceConnectionProvider

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.