Examples of PropertyDefinition


Examples of org.rhq.core.domain.configuration.definition.PropertyDefinition

    {
        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
                // in the original metaValue which we are using
View Full Code Here

Examples of org.rhq.core.domain.configuration.definition.PropertyDefinition

        {
            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
View Full Code Here

Examples of org.rhq.core.domain.configuration.definition.PropertyDefinition

      if (opDef.getName().equals(operationName)) {
        if (opDef.getResultsConfigurationDefinition()==null) break;
         
        Map propDefs = opDef.getResultsConfigurationDefinition()
            .getPropertyDefinitions();
        PropertyDefinition listPropDefinition = (PropertyDefinition) propDefs
            .get(LISTNAME);
       
        if (listPropDefinition == null) {
          continue;
        }

        PropertyDefinition propertyDefinitionMap = ((PropertyDefinitionList) listPropDefinition)
            .getMemberDefinition();
        Map simpleProperties = ((PropertyDefinitionMap) propertyDefinitionMap)
            .getPropertyDefinitions();
        Iterator simplePropertiesIter = simpleProperties.values()
            .iterator();
       
        while (simplePropertiesIter.hasNext()) {
          PropertyDefinition simpleProp = (PropertyDefinition) simplePropertiesIter
              .next();
          String fieldName = ((PropertyDefinitionSimple) simpleProp)
              .getName();
          fieldNameList.add(fieldName);
        }
View Full Code Here

Examples of org.rhq.core.domain.configuration.definition.PropertyDefinition

  }

  private void init() {
    fieldNameList = new LinkedList();

    PropertyDefinition listPropDefinition = (PropertyDefinition) propertDefinitions
        .get(LISTNAME);

    PropertyDefinition propertyDefinitionMap = ((PropertyDefinitionList) listPropDefinition)
        .getMemberDefinition();
    Map simpleProperties = ((PropertyDefinitionMap) propertyDefinitionMap)
        .getPropertyDefinitions();
    Iterator simplePropertiesIter = simpleProperties.values()
        .iterator();

    while (simplePropertiesIter.hasNext()) {
      PropertyDefinition simpleProp = (PropertyDefinition) simplePropertiesIter
          .next();
      String fieldName = ((PropertyDefinitionSimple) simpleProp)
          .getName();
      fieldNameList.add(fieldName);
    }
View Full Code Here

Examples of org.rhq.core.domain.configuration.definition.PropertyDefinition

   
    Iterator<String> propkeys = propDefs.keySet().iterator();
   
    while (propkeys.hasNext()) {
      final String key = propkeys.next();
      PropertyDefinition pdef = propDefs.get(key);
     
      if (pdef instanceof PropertyDefinitionSimple) {
        String fieldName = ((PropertyDefinitionSimple) pdef).getName();
        if (values.containsKey(fieldName)) {
       
          properties.add(new PropertySimple(key, values.get(fieldName)));
        }
      } else if (pdef instanceof PropertyDefinitionList) {
        PropertyDefinition propertyDefinitionMap = ((PropertyDefinitionList) pdef)
            .getMemberDefinition();
        Map simpleProperties = ((PropertyDefinitionMap) propertyDefinitionMap)
            .getPropertyDefinitions();
        Iterator simplePropertiesIter = simpleProperties.values()
            .iterator();
   
        while (simplePropertiesIter.hasNext()) {
          PropertyDefinition simpleProp = (PropertyDefinition) simplePropertiesIter
              .next();
          String fieldName = ((PropertyDefinitionSimple) simpleProp)
              .getName();
          if (values.contains(fieldName)) {
           
View Full Code Here

Examples of org.rhq.core.domain.configuration.definition.PropertyDefinition

        .getResourceConfigurationDefinition();
    Map<String, PropertyDefinition> propDefs = configDef
        .getPropertyDefinitions();
    Set<String> propNames = managedProperties.keySet();
    for (String propName : propNames) {
      PropertyDefinition propertyDefinition = propDefs.get(propName);
      ManagedProperty managedProperty = managedProperties.get(propName);
      if (propertyDefinition == null) {
        if (!managedProperty.hasViewUse(ViewUse.STATISTIC))
          LOG
              .debug(resourceType
View Full Code Here

Examples of org.rhq.core.domain.configuration.definition.PropertyDefinition

    for (ManagedProperty managedProperty : managedProperties.values()) {
      String propertyName = managedProperty.getName();
      if (prefix != null) {
        propertyName = prefix + "." + propertyName; //$NON-NLS-1$
      }
      PropertyDefinition propertyDefinition = configDefinition.get(propertyName);
      if (propertyDefinition == null) {
        // The managed property is not defined in the configuration
        continue;
      }
      populateManagedPropertyFromProperty(managedProperty,propertyDefinition, configuration);
View Full Code Here

Examples of org.rhq.core.domain.configuration.definition.PropertyDefinition

      if (memberPropDefs.isEmpty())
        throw new IllegalStateException(
            "PropertyDefinitionMap doesn't contain any member PropertyDefinitions."); //$NON-NLS-1$
      // NOTE: We assume member prop defs are all of the same type, since
      // for MapCompositeMetaTypes, they have to be.
      PropertyDefinition mapMemberPropDef = memberPropDefs.values()
          .iterator().next();
      MetaType mapMemberMetaType = convertPropertyDefinitionToMetaType(mapMemberPropDef);
      memberMetaType = new MapCompositeMetaType(mapMemberMetaType);
    } else {
      throw new IllegalStateException(
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.