Examples of PropertyMap


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

    String translatorName = ProfileServiceUtil.getSimpleValuetranslator, "name", String.class);
    String description = ProfileServiceUtil.getSimpleValuetranslator, "description", String.class);

    Configuration c = resourceConfiguration;
    PropertyList list = new PropertyList("translatorList");
    PropertyMap propMap = null;
    c.put(list);

    // First get translator specific properties
    ManagedProperty translatorProps = translator.getProperty("property");
    try {
View Full Code Here

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

    MapCompositeValueSupport unwrappedvalueMap = null;
    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);
      }
View Full Code Here

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

    return result;
  }
 
  private void setComplexResult() {
    PropertyList list = new PropertyList(LISTNAME); //$NON-NLS-1$
    PropertyMap pm;
    Iterator resultIter = ((List)content).iterator();
    while (resultIter.hasNext()) {
      Map reportRowMap = (Map) resultIter.next();
      Iterator reportRowKeySetIter = reportRowMap.keySet().iterator();
      pm = new PropertyMap(MAPNAME); //$NON-NLS-1$     

      while (reportRowKeySetIter.hasNext()) {
        String key = (String) reportRowKeySetIter.next();
        pm.put(new PropertySimple(key, reportRowMap.get(key)==null?"":reportRowMap.get(key))); //$NON-NLS-1$
      }
      list.add(pm);
    }
    result = list;
    operationResult.getComplexResults().put(list);
View Full Code Here

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

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

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

    MapCompositeValueSupport unwrappedvalue = null;
    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 {
View Full Code Here

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

      List<Property> singleSourceModelsPropertyList = resourceConfiguration
          .getList("singleSourceModels").getList();
      ArrayList<List<Property>> sourceMappingList = new ArrayList<List<Property>>();
      sourceMappingList.add(singleSourceModelsPropertyList);
      sourceMappingList.add(multiSourceModelsPropertyList);
      PropertyMap model = null;
      Iterator<List<Property>> sourceMappingListIterator = sourceMappingList
          .iterator();
      while (sourceMappingListIterator.hasNext()) {
        List<Property> sourceList = sourceMappingListIterator.next();
        for (int i = 0; i < sourceList.size(); i++) {
          model = (PropertyMap) sourceList.get(i);
          String sourceName = ((PropertySimple) model
              .get("sourceName")).getStringValue(); //$NON-NLS-1$
          if (sourceName.equals("See below"))
            continue; // This is a multisource model which we will
                  // handle separately
          String modelName = ((PropertySimple) model.get("name")) //$NON-NLS-1$
              .getStringValue();
          String dsName = ((PropertySimple) model.get("jndiName")) //$NON-NLS-1$
              .getStringValue();

          ManagedObject managedModel = null;
          if (models != null && models.length != 0) {
            for (GenericValue genValue : models) {
View Full Code Here

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

              "severity").getValue()).getValue().toString();
          String message = ((SimpleValue) errorMo
              .getProperty("value").getValue()).getValue()
              .toString();

          PropertyMap errorMap = new PropertyMap("errorMap",
              new PropertySimple("severity", severity),
              new PropertySimple("message", message));
          errorList.add(errorMap);
        }
      }

      for (Map<String, String> sourceMap : sourceList) {

        if (isSource) {
          String sourceName = (String) sourceMap.get("name");
          String jndiName = (String) sourceMap.get("jndiName");
          String translatorName = (String) sourceMap
              .get("translatorName");
          PropertyMap multiSourceModel = null;

          PropertyMap model = null;
          if (supportMultiSource) {
            // TODO need to loop through multisource models
            multiSourceModel = new PropertyMap("map",
                new PropertySimple("name", modelName),
                new PropertySimple("sourceName", sourceName),
                new PropertySimple("jndiName", jndiName),
                new PropertySimple("translatorName",
                    translatorName));

            multiSourceModelsList.add(multiSourceModel);

            model = new PropertyMap("map", new PropertySimple(
                "name", modelName), new PropertySimple(
                "sourceName", "See below"), new PropertySimple(
                "jndiName", "See below"), new PropertySimple(
                "translatorName", "See below"),
                new PropertySimple("visibility", visibility),
                new PropertySimple("supportsMultiSource", true));
            sourceModelsList.add(model);
          } else {
            model = new PropertyMap("map", new PropertySimple(
                "name", modelName), new PropertySimple(
                "sourceName", sourceName), new PropertySimple(
                "jndiName", jndiName), new PropertySimple(
                "translatorName", translatorName),
                new PropertySimple("visibility", visibility),
                new PropertySimple("supportsMultiSource",
                    supportMultiSource));
            sourceModelsList.add(model);
          }
        } else {
          PropertyMap model = new PropertyMap("map",
              new PropertySimple("name", modelName),
              new PropertySimple("type", type),
              new PropertySimple("visibility", visibility));

          logicalModelsList.add(model);
View Full Code Here

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

              .stringValue(((CompositeValueSupport) propertyMetaData)
                  .get("name"));
          String propertyValue = ProfileServiceUtil
              .stringValue(((CompositeValueSupport) propertyMetaData)
                  .get("value"));
          PropertyMap translatorMap = null;

          translatorMap = new PropertyMap("translatorMap",
              new PropertySimple("name", translatorName),
              new PropertySimple("type", translatorType),
              new PropertySimple("propertyName", propertyName),
              new PropertySimple("propertyValue", propertyValue));
          // Only want translator name and value to show up for the
View Full Code Here

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

    return result;
  }
 
  private void setComplexResult() {
    PropertyList list = new PropertyList(LISTNAME); //$NON-NLS-1$
    PropertyMap pm;
    Iterator resultIter = ((List)content).iterator();
    while (resultIter.hasNext()) {
      Map reportRowMap = (Map) resultIter.next();
      Iterator reportRowKeySetIter = reportRowMap.keySet().iterator();
      pm = new PropertyMap("userMap"); //$NON-NLS-1$     

      while (reportRowKeySetIter.hasNext()) {
        String key = (String) reportRowKeySetIter.next();
        pm.put(new PropertySimple(key, reportRowMap.get(key)==null?"":reportRowMap.get(key))); //$NON-NLS-1$
      }
      list.add(pm);
    }
   
    result = list;
View Full Code Here

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

  public static Map<String, PropertySimple> getCustomProperties(
      Configuration pluginConfig) {
    Map<String, PropertySimple> customProperties = new LinkedHashMap<String, PropertySimple>();
    if (pluginConfig == null)
      return customProperties;
    PropertyMap customPropsMap = pluginConfig.getMap("custom-properties"); //$NON-NLS-1$
    if (customPropsMap != null) {
      Collection<Property> customProps = customPropsMap.getMap().values();
      for (Property customProp : customProps) {
        if (!(customProp instanceof PropertySimple)) {
          LOG
              .error("Custom property definitions in plugin configuration must be simple properties - property " //$NON-NLS-1$
                  + customProp + " is not - ignoring..."); //$NON-NLS-1$
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.