Package org.rhq.core.domain.configuration

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


            mapMemberPropNames.add((String)key);
        // There won't be any keys when loading a Configuration for the first time.
        for (String mapMemberPropName : mapMemberPropNames)
        {
            // We assume the PropertyMap is an "open map", since that's what PropertiesMetaValue maps to.
            PropertySimple mapMemberProp = propMap.getSimple(mapMemberPropName);
            // Create a PropertySimple and populate it.
            if (mapMemberProp == null)
            {
                mapMemberProp = new PropertySimple(mapMemberPropName, propertiesValue.getProperty(mapMemberPropName));
                propMap.put(mapMemberProp);
            }
        }
    }
View Full Code Here


{
    private final Log log = LogFactory.getLog(PluginConstants.DEFAULT_LOGGER_CATEGORY);

    public PropertySimple convertToProperty(MetaValue metaValue, PropertyDefinitionSimple propDefSimple)
    {
        PropertySimple propSimple = new PropertySimple(propDefSimple.getName(), null);
        populatePropertyFromMetaValue(propSimple, metaValue, propDefSimple);
        return propSimple;
    }
View Full Code Here

                {
                    log.error("Nested ManagedProperty's value [" + managedProp.getValue()
                            + "] is not a SimpleValue or EnumValue - unsupported!");
                    continue;
                }
                propMap.put(new PropertySimple(propName, value));
            }
        }
    }
View Full Code Here

                    {
                        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

      );

      // Get plugin config map for models
      Configuration configuration = detail.getPluginConfiguration();

      configuration.put(new PropertySimple("name", translatorName));//$NON-NLS-1$
      detail.setPluginConfiguration(configuration);
     
       // Add to return values
      // First get translator specific properties
      ManagedProperty translatorProps = translator.getProperty("property");//$NON-NLS-1$
      PropertyList list = new PropertyList("translatorList");//$NON-NLS-1$
      PropertyMap propMap = null;
      getTranslatorValues(translatorProps.getValue(), propMap, list);

      // Now get common properties
      configuration.put(new PropertySimple("name", translatorName));//$NON-NLS-1$
      configuration.put(new PropertySimple("type",ProfileServiceUtil.getSimpleValue(translator,"type", String.class)));//$NON-NLS-1$ //$NON-NLS-2$

      detail.setPluginConfiguration(configuration);
      // Add to return values
      discoveredResources.add(detail);
      log.debug("Discovered Teiid Translator: " + translatorName);
View Full Code Here

    if (metaType.isComposite()) {
      unwrappedvalue = (MapCompositeValueSupport)pValue;

      for (String key : unwrappedvalue.getMetaType().keySet()) {
        map = new PropertyMap("properties");//$NON-NLS-1$
        map.put(new PropertySimple("name", key));//$NON-NLS-1$
        map.put(new PropertySimple("value", ProfileServiceUtil.stringValue((MetaValue)unwrappedvalue.get(key))));//$NON-NLS-1$
        list.add(map);
      }
    } else {
      throw new IllegalStateException(pValue + " is not a Composite type");
    }
View Full Code Here

    } catch (Exception e) {
      throw new RuntimeException(e.getMessage());
    }

    // Now get common properties
    c.put(new PropertySimple("name", translatorName));
    c.put(new PropertySimple("description", description));
   
    return c;

  }
View Full Code Here

    if (metaType.isComposite()) {
      unwrappedvalueMap = (MapCompositeValueSupport) pValue;

      for (String key : unwrappedvalueMap.getMetaType().keySet()) {
        map = new PropertyMap("property");
        map.put(new PropertySimple("name", key));
        map.put(new PropertySimple("value", ProfileServiceUtil.stringValue((MetaValue)unwrappedvalueMap.get(key))));
        map.put(new PropertySimple("description", "Custom property"));
        list.add(map);
      }
    } else {
      throw new IllegalStateException(pValue + " is not a Composite type");
    }
View Full Code Here

        // Config
        null // Process info from a process scan
    );

    Configuration configuration = detail.getPluginConfiguration();
    configuration.put(new PropertySimple("displayPreviewVDBS", Boolean.FALSE));
    detail.setPluginConfiguration(configuration);

    // Add to return values
    discoveredResources.add(detail);
    log.debug("Discovered Teiid instance: " + mc.getName()); //$NON-NLS-1$
View Full Code Here

   */
  private void setProperties(String compName, Map<String, ManagedProperty> mcMap, Configuration configuration) {
    for (ManagedProperty mProp : mcMap.values()) {
      try {
        String value = ProfileServiceUtil.stringValue(mProp.getValue());
        PropertySimple prop = new PropertySimple(compName+"."+mProp.getName(), value); //$NON-NLS-1$
        configuration.put(prop);
      } catch (Exception e) {
        LOG.error("Exception setting properties in Platform loadConfiguration(): "  + e.getMessage()); //$NON-NLS-1$
      }
    }
View Full Code Here

TOP

Related Classes of org.rhq.core.domain.configuration.PropertySimple

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.