Examples of PropertySimple


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

      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.PropertySimple

    createResourceReport.setResourceName(resourceName);
    String resourceKey = getResourceKey(resourceType, resourceName);
    createResourceReport.setResourceKey(resourceKey);

    PropertySimple templateNameProperty = resourceConfig
        .getSimple(TranslatorComponent.Config.TEMPLATE_NAME);
    String templateName = templateNameProperty.getStringValue();

    DeploymentTemplateInfo template;
    try {
      template = managementView.getTemplate(templateName);
      Map<String, ManagedProperty> managedProperties = template.getProperties();
View Full Code Here

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

      if (!deployName.endsWith(DQPManagementView.VDB_EXT) &&  !deployName.endsWith(DQPManagementView.DYNAMIC_VDB_EXT)){
        deployName = deployName + DQPManagementView.VDB_EXT; 
      }

      //null out version
      PropertySimple nullVersionProperty = new PropertySimple(Operation.Value.VDB_VERSION, null);
      createResourceReport.getPackageDetails().getDeploymentTimeConfiguration().put(nullVersionProperty);
      createResourceReport.setUserSpecifiedResourceName(deployName);
    }
   
    getDeployer().deploy(createResourceReport, createResourceReport.getResourceType());
View Full Code Here

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

        return new RemoteDeployer(profileServiceConnection, this.resourceContext);
    }

  private static String getResourceName(Configuration pluginConfig,
      Configuration resourceConfig) {
    PropertySimple resourceNameProp = pluginConfig
        .getSimple(TranslatorComponent.Config.RESOURCE_NAME);
    if (resourceNameProp == null
        || resourceNameProp.getStringValue() == null)
      throw new IllegalStateException("Property [" //$NON-NLS-1$
          + TranslatorComponent.Config.RESOURCE_NAME
          + "] is not defined in the default plugin configuration."); //$NON-NLS-1$
    String resourceNamePropName = resourceNameProp.getStringValue();
    PropertySimple propToUseAsResourceName = resourceConfig
        .getSimple(resourceNamePropName);
    if (propToUseAsResourceName == null)
      throw new IllegalStateException("Property [" + resourceNamePropName //$NON-NLS-1$
          + "] is not defined in initial Resource configuration."); //$NON-NLS-1$
    return propToUseAsResourceName.getStringValue();
  }
View Full Code Here

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

        String.class);

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

    configuration.put(new PropertySimple("name", vdbName));
    configuration.put(new PropertySimple("version", vdbVersion));
    configuration.put(new PropertySimple("description", vdbDescription));
    configuration.put(new PropertySimple("status", vdbStatus));
    configuration.put(new PropertySimple("url", vdbURL));
    configuration.put(new PropertySimple("connectionType", connectionType));

    try {
      getTranslators(mcVdb, configuration);
    } catch (Exception e) {
      final String msg = "Exception in loadResourceConfiguration(): " + e.getMessage(); //$NON-NLS-1$
View Full Code Here

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

          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.PropertySimple

              .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
          // first row,
          // so we will blank them out here.
          translatorName = "";
          translatorType = "";
View Full Code Here

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

    Set<ManagedComponent> vdbs = ProfileServiceUtil
        .getManagedComponents(connection, new ComponentType(
            PluginConstants.ComponentType.VDB.TYPE,
            PluginConstants.ComponentType.VDB.SUBTYPE));
   
    PropertySimple displayPreviewVdbs = ((PlatformComponent)discoveryContext.getParentResourceComponent()).getResourceConfiguration().getSimple("displayPreviewVDBS");
   
    for (ManagedComponent mcVdb : vdbs) {

      boolean skipVdb = false;
      if (!displayPreviewVdbs.getBooleanValue()){
        MetaValue[] propsArray = ((CollectionValueSupport)mcVdb.getProperty("JAXBProperties").getValue()).getElements();
        String isPreview = "false";
       
        for (MetaValue propertyMetaData : propsArray) {
          GenericValueSupport genValueSupport = (GenericValueSupport) propertyMetaData;
          ManagedObjectImpl managedObject = (ManagedObjectImpl) genValueSupport
              .getValue();
 
          String propertyName = ProfileServiceUtil.getSimpleValue(
              managedObject, "name", String.class);
          if (propertyName.equals("preview")){
            isPreview =ProfileServiceUtil.getSimpleValue(
                managedObject, "value", String.class);
            if (Boolean.valueOf(isPreview)) skipVdb=true;
            break;
          }
        } 
      }
       
      //If this is a Preview VDB and displayPreviewVdbs is false, skip this VDB
      if (skipVdb) continue;
       
      String vdbKey = (String)mcVdb.getName();
      String vdbName = vdbKey;
      String fullName = ProfileServiceUtil.getSimpleValue(mcVdb, "fullName",
          String.class);
      Integer vdbVersion = ProfileServiceUtil.getSimpleValue(mcVdb,
          "version", Integer.class);
      String vdbDescription = ProfileServiceUtil.getSimpleValue(mcVdb,
          "description", String.class);
      String vdbStatus = ProfileServiceUtil.getSimpleValue(mcVdb,
          "status", String.class);
      String vdbURL = ProfileServiceUtil.getSimpleValue(mcVdb, "url",
          String.class);

      /**
       *
       * A discovered resource must have a unique key, that must stay the
       * same when the resource is discovered the next time
       */
      DiscoveredResourceDetails detail = new DiscoveredResourceDetails(
          discoveryContext.getResourceType(), // ResourceType
          vdbKey, // Resource Key
          vdbName, // Resource Name
          vdbVersion.toString(), // Version
          PluginConstants.ComponentType.VDB.DESCRIPTION, // Description
          discoveryContext.getDefaultPluginConfiguration(), // Plugin
          // Config
          null // Process info from a process scan
      );

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

      configuration.put(new PropertySimple("name", vdbName));
      configuration.put(new PropertySimple("fullName", fullName));
      configuration.put(new PropertySimple("version", vdbVersion));
      configuration
          .put(new PropertySimple("description", vdbDescription));
      configuration.put(new PropertySimple("status", vdbStatus));
      configuration.put(new PropertySimple("url", vdbURL));

      detail.setPluginConfiguration(configuration);

      // Add to return values
      discoveredResources.add(detail);
View Full Code Here

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

      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.PropertySimple

     
      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)) {
           
            properties.add(new PropertySimple(key, values.get(fieldName)));
          }
        }
   
      }
     
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.