Package org.rhq.core.domain.configuration

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


    }
   
    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 {
      getTranslatorValues(translatorProps.getValue(), propMap, list);
    } 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


        discoveryContext.getDefaultPluginConfiguration(), // Plugin
        // 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

  @Override
  public void updateResourceConfiguration(ConfigurationUpdateReport report) {

    resourceConfiguration = report.getConfiguration().deepCopy();

    Configuration resourceConfig = report.getConfiguration();

    ManagementView managementView = null;
    ComponentType componentType = new ComponentType(
        PluginConstants.ComponentType.Platform.TEIID_TYPE,
        PluginConstants.ComponentType.Platform.TEIID_SUB_TYPE);
View Full Code Here

   */
  @Override
  public Configuration loadResourceConfiguration() {

    // Get plugin config
    Configuration c = resourceConfiguration;
   
    getProperties(c);

    return c;

View Full Code Here

      // configs in the plugin descriptor.
      resourceConfiguration = this.resourceContext
          .getPluginConfiguration();
    }

    Configuration config = resourceConfiguration;

    return config;
  }
View Full Code Here

   */
  public void updateResourceConfiguration(ConfigurationUpdateReport report) {

    resourceConfiguration = report.getConfiguration().deepCopy();

    Configuration resourceConfig = report.getConfiguration();

    ManagementView managementView = null;
    ComponentType componentType = null;
    if (this.getComponentType().equals(
        PluginConstants.ComponentType.VDB.NAME)) {
View Full Code Here

  @Override
  public Set<ResourcePackageDetails> discoverDeployedPackages(PackageType arg0) {

    // PLEASE DO NOT REMOVE THIS METHOD. IT IS REQUIRED FOR THE CONTENT TAB.

    Configuration pluginConfig = this.resourceContext
        .getPluginConfiguration();
    this.deploymentUrl = pluginConfig.getSimple("url").getStringValue(); //$NON-NLS-1$

    if (this.deploymentUrl != null) {
      this.deploymentFile = new File(this.deploymentUrl
          .substring(deploymentUrl.indexOf(":/") + 1)); //$NON-NLS-1$
    }
View Full Code Here

      ResourceType resourceType) {
    ConfigurationTemplate pluginConfigDefaultTemplate = resourceType
        .getPluginConfigurationDefinition().getDefaultTemplate();
    return (pluginConfigDefaultTemplate != null) ? pluginConfigDefaultTemplate
        .createConfiguration()
        : new Configuration();
  }
View Full Code Here

  }

  private CreateResourceReport createConfigurationBasedResource(
      CreateResourceReport createResourceReport) {
    ResourceType resourceType = createResourceReport.getResourceType();
    Configuration defaultPluginConfig = getDefaultPluginConfiguration(resourceType);
    Configuration resourceConfig = createResourceReport
        .getResourceConfiguration();
    String resourceName = getResourceName(defaultPluginConfig,
        resourceConfig);
    ComponentType componentType = ProfileServiceUtil
        .getComponentType(resourceType);
    ManagementView managementView = null;
    ;
    managementView = getConnection().getManagementView();

    if (ProfileServiceUtil.isManagedComponent(getConnection(),
        resourceName, componentType)) {
      createResourceReport.setStatus(CreateResourceStatus.FAILURE);
      createResourceReport.setErrorMessage("A " + resourceType.getName() //$NON-NLS-1$
          + " named '" + resourceName + "' already exists."); //$NON-NLS-1$ //$NON-NLS-2$
      return createResourceReport;
    }

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

          discoveryContext.getDefaultPluginConfiguration(), // Plugin config
          null // Process info from a process scan
      );

      // 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

TOP

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

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.