Package org.rhq.core.domain.configuration

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


    public void populateMetaValueFromProperty(PropertyMap propMap, MetaValue metaValue, PropertyDefinitionMap propDefMap)
    {
        PropertiesMetaValue propertiesValue = (PropertiesMetaValue)metaValue;
        for (String mapMemberPropName : propMap.getMap().keySet())
        {
            Property mapMemberProp = propMap.get(mapMemberPropName);
            propertiesValue.setProperty(mapMemberProp.getName(), ((PropertySimple)mapMemberProp).getStringValue());
        }
    }
View Full Code Here


            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

                MetaType listMemberMetaType = collectionValue.getMetaType().getElementType();
                MetaValue[] listMemberValues = collectionValue.getElements();
                PropertyAdapter propertyAdapter = PropertyAdapterFactory.getPropertyAdapter(listMemberMetaType);
                for (MetaValue listMemberValue : listMemberValues)
                {
                    Property listMemberProp = propertyAdapter.convertToProperty(listMemberValue, memberPropDef);
                    propList.add(listMemberProp);
                }
            }
        }
    }
View Full Code Here

            for (String key : map.keySet())
            {
                PropertyDefinition definition = map.get(key);
                MetaValue[] getKey = new MetaValue[]{SimpleValueSupport.wrap(key)};
                MetaValue value = tableValueSupport.get(getKey);
                Property innerProperty = properties.get(key);
                PropertyAdapter adapter = PropertyAdapterFactory.getPropertyAdapter(value);
                adapter.populateMetaValueFromProperty(innerProperty, value, definition);
            }
        }
    }
View Full Code Here

    public void populateMetaValueFromProperty(PropertyMap propMap, MetaValue metaValue, PropertyDefinitionMap propDefMap)
    {
        CompositeValue compositeValue = (CompositeValue)metaValue;               
        for (String mapMemberPropName : propMap.getMap().keySet())
        {
            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
View Full Code Here

        CompositeValue compositeValue = (CompositeValue)metaValue;
        Set<String> mapMemberPropNames = compositeValue.getMetaType().keySet();
        // There won't be any keys when loading a Configuration for the first time.
        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)
View Full Code Here

  }

  protected void createContentBasedResource(
      CreateResourceReport createResourceReport) {

    Property versionProp = createResourceReport.getPackageDetails().getDeploymentTimeConfiguration().get(Operation.Value.VDB_VERSION);
    String name = createResourceReport.getPackageDetails().getKey().getName();
    name = name.substring(name.lastIndexOf(File.separatorChar)+1);
    String userSpecifiedName = createResourceReport.getUserSpecifiedResourceName();
    String deployName = (userSpecifiedName !=null ? userSpecifiedName : name);
   
View Full Code Here

                + metaValue.getMetaType()
                + "] for ResourceType '" //$NON-NLS-1$
                + resourceType.getName() + "'."); //$NON-NLS-1$
        continue;
      }
      Property property = propertyAdapter.convertToProperty(metaValue,
          propertyDefinition);
      config.put(property);
    }
    return config;
  }
View Full Code Here

            return;
        }
       
        List<PropertySimple> replacementCandidates = new ArrayList<PropertySimple>();
        for(PropertyDefinition def : definition.getPropertyDefinitions().values()) {
            Property prop = config.get(def.getName());
            propertySwitch(def, prop, replacementCandidates);
        }
       
        for(PropertySimple prop : replacementCandidates) {
            replace(prop);
View Full Code Here

        }
    }
   
    private static void traverse(PropertyDefinitionMap definition, PropertyMap map, List<PropertySimple> replacementCandidates) {
        for(PropertyDefinition def: definition.getMap().values()) {
            Property prop = map.get(def.getName());
            propertySwitch(def, prop, replacementCandidates);
        }
    }
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.