Examples of PropertySimple


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

        // Don't even add a Property to the Configuration if the
        // ManagedProperty is flagged as removed or has a
        // null value.
        continue;
      }
      PropertySimple customProp = customProps.get(propName);
      PropertyAdapter<Property, PropertyDefinition> propertyAdapter = PropertyAdapterFactory
          .getCustomPropertyAdapter(customProp);
      if (propertyAdapter == null)
        propertyAdapter = PropertyAdapterFactory
            .getPropertyAdapter(metaValue);
View Full Code Here

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

        Boolean anyAuthenticated = ProfileServiceUtil.getSimpleValue(
            managedObject, "anyAuthenticated", Boolean.class); //$NON-NLS-1$
        String description = ProfileServiceUtil.getSimpleValue(
            managedObject, "description", String.class); //$NON-NLS-1$

        configuration.put(new PropertySimple("name", dataRoleName)); //$NON-NLS-1$
        configuration.put(new PropertySimple("anyAuthenticated", //$NON-NLS-1$
            anyAuthenticated));
        configuration
            .put(new PropertySimple("description", description)); //$NON-NLS-1$

        PropertyList mappedRoleNameList = new PropertyList(
            "mappedRoleNameList"); //$NON-NLS-1$
        configuration.put(mappedRoleNameList);
        ManagedProperty mappedRoleNames = managedObject
            .getProperty("mappedRoleNames"); //$NON-NLS-1$
        if (mappedRoleNames != null) {
          CollectionValueSupport props = (CollectionValueSupport) mappedRoleNames
              .getValue();
          for (MetaValue mappedRoleName : props.getElements()) {
            PropertyMap mappedRoleNameMap = null;

            try {
              mappedRoleNameMap = new PropertyMap(
                  "map", //$NON-NLS-1$
                  new PropertySimple(
                      "name", (ProfileServiceUtil.stringValue(mappedRoleName)))); //$NON-NLS-1$
            } catch (Exception e) {
              final String msg = "Exception in loadResourceConfiguration(): " + e.getMessage(); //$NON-NLS-1$
              LOG.error(msg, e);
            }
View Full Code Here

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

            null // Process info from a process scan
        );

        Configuration configuration = detail.getPluginConfiguration();

        configuration.put(new PropertySimple("name", dataRoleName));
        configuration.put(new PropertySimple("anyAuthenticated",
            anyAuthenticated));
        configuration
            .put(new PropertySimple("description", description));

        PropertyList mappedRoleNameList = new PropertyList(
            "mappedRoleNameList");
        configuration.put(mappedRoleNameList);
        ManagedProperty mappedRoleNames = managedObject
            .getProperty("mappedRoleNames");
        if (mappedRoleNames != null) {
          CollectionValueSupport props = (CollectionValueSupport)mappedRoleNames.getValue();
          for (MetaValue mappedRoleName : props.getElements()) {
            mappedRoleNameList.add(new PropertySimple("name", ProfileServiceUtil.stringValue(mappedRoleName)));
          }

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

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

   */
  public static Collection<Property> getSimplePropertyCollection(Properties properties){
    Collection<Property> collection  = Collections.emptyList();
   
    for (String key : properties.stringPropertyNames()) {
      collection.add(new PropertySimple(key,properties.get(key)));
    }
   
    return collection;
  }
View Full Code Here

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

    @Override
    public Configuration loadResourceConfiguration() throws Exception {
        Configuration config = super.loadResourceConfiguration();
        String f = getCacheFlavorFromPath();
        PropertySimple flavor = new PropertySimple(FLAVOR, f);
        config.put(flavor);
        return config;
    }
View Full Code Here

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

        Operation add = new Operation("add",address);
        for (Property prop: config.getProperties()) {
            if (prop.getName().equals(FLAVOR)) {
                continue;
            }
            PropertySimple ps = (PropertySimple) prop;
            add.addAdditionalProperty(prop.getName(),ps.getStringValue()); // TODO format conversion?

        }
        Result result = getASConnection().execute(add);
        if (result.isSuccess()) {
            report.setResourceKey(address.getPath());
View Full Code Here

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

            ConnectionSettings connectionSettings = new ConnectionSettings();

            String connectionTypeDescriptorClass = pluginConfig.getSimple(JMXDiscoveryComponent.CONNECTION_TYPE)
                  .getStringValue();
            PropertySimple serverUrl = pluginConfig
                  .getSimple(JMXDiscoveryComponent.CONNECTOR_ADDRESS_CONFIG_PROPERTY);

            connectionSettings.initializeConnectionType((ConnectionTypeDescriptor) Util.getInstance(connectionTypeDescriptorClass));
            // if not provided use the default serverUrl
            if (null != serverUrl) {
               connectionSettings.setServerUrl(serverUrl.getStringValue());
            }

//                connectionSettings.setPrincipal(pluginConfig.getSimpleValue(PRINCIPAL_CONFIG_PROP, null));
//                connectionSettings.setCredentials(pluginConfig.getSimpleValue(CREDENTIALS_CONFIG_PROP, null));
View Full Code Here

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

    }

    @Override
    public void getValues(MeasurementReport report, Set<MeasurementScheduleRequest> requests) {
      Configuration pluginConfig = this.context.getPluginConfiguration();
      pluginConfig.put(new PropertySimple("type", "service"));
        for (MeasurementScheduleRequest request : requests) {
          String metricName = request.getName();
          if (metricName.equals(MEP)) {
            EmsAttribute attribute = getEmsBean().getAttribute(MEP);
            String processed = new String();
View Full Code Here

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

    }

    @Override
    public void getValues(MeasurementReport report, Set<MeasurementScheduleRequest> requests) {
      Configuration pluginConfig = this.context.getPluginConfiguration();
      pluginConfig.put(new PropertySimple("type", "action"));
      //String actionName = pluginConfig.getActionName();
 
      String actionName = this.context.getResourceKey();
      actionName = actionName.trim();
        //Object entityStatistics = operation.invoke(context.getResourceKey());
View Full Code Here

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

    }

    @Override
    public void getValues(MeasurementReport report, Set<MeasurementScheduleRequest> requests) {
      Configuration pluginConfig = this.context.getPluginConfiguration();
      pluginConfig.put(new PropertySimple("type", "service"));
      Integer overallMessages = new Integer(0);
     
      long bytesProcessed = 0;
      long bytesFailed = 0;
        for (MeasurementScheduleRequest request : requests) {
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.