Examples of ConfigurationTemplate


Examples of br.com.ingenieux.mojo.beanstalk.ConfigurationTemplate

   
    return null;
  }

  CreateConfigurationTemplateResult createConfiguration(String templateName) {
    ConfigurationTemplate template = getConfigurationTemplate(templateName);
   
    CreateConfigurationTemplateRequest req = new CreateConfigurationTemplateRequest(applicationName, templateName);
   
    req.setSolutionStackName(template.getSolutionStack());
    req.setOptionSettings(Arrays.asList(template.getOptionSettings()));
   
    return service.createConfigurationTemplate(req);
  }
View Full Code Here

Examples of br.com.ingenieux.mojo.beanstalk.ConfigurationTemplate

   
    return null;
  }

  CreateConfigurationTemplateResult createConfiguration(String templateName) {
    ConfigurationTemplate template = getConfigurationTemplate(templateName);
   
    CreateConfigurationTemplateRequest req = new CreateConfigurationTemplateRequest(applicationName, templateName);
   
    req.setSolutionStackName(template.getSolutionStack());
    req.setOptionSettings(Arrays.asList(template.getOptionSettings()));
   
    return service.createConfigurationTemplate(req);
  }
View Full Code Here

Examples of br.com.ingenieux.mojo.beanstalk.ConfigurationTemplate

   
    return null;
  }

  CreateConfigurationTemplateResult createConfiguration(String templateName) {
    ConfigurationTemplate template = getConfigurationTemplate(templateName);
   
    CreateConfigurationTemplateRequest req = new CreateConfigurationTemplateRequest(applicationName, templateName);
   
    req.setSolutionStackName(template.getSolutionStack());
    req.setOptionSettings(Arrays.asList(template.getOptionSettings()));
   
    return getService().createConfigurationTemplate(req);
  }
View Full Code Here

Examples of br.com.ingenieux.mojo.beanstalk.ConfigurationTemplate

   
    return null;
  }

  CreateConfigurationTemplateResult createConfiguration(String templateName) throws MojoFailureException {
    ConfigurationTemplate template = getConfigurationTemplate(templateName);

        if (null == template)
            throw new MojoFailureException(String.format("templateName ('%s') not found", templateName));

        if (isBlank(template.getSolutionStack()))
            throw new MojoFailureException(String.format("Please define solutionStack/ in template %s", templateName));

    CreateConfigurationTemplateRequest req = new CreateConfigurationTemplateRequest(applicationName, templateName);
   
    req.setSolutionStackName(template.getSolutionStack());
    req.setOptionSettings(Arrays.asList(template.getOptionSettings()));
   
    return getService().createConfigurationTemplate(req);
  }
View Full Code Here

Examples of br.com.ingenieux.mojo.beanstalk.ConfigurationTemplate

   
    return null;
  }

  UpdateConfigurationTemplateResult updateConfiguration(String templateName) throws MojoFailureException {
    ConfigurationTemplate template = getConfigurationTemplate(templateName);

        if (null == template)
            throw new MojoFailureException(String.format("templateName ('%s') not found", templateName));

        if (isBlank(template.getSolutionStack()))
            throw new MojoFailureException(String.format("Please define solutionStack/ in template %s", templateName));

    UpdateConfigurationTemplateRequest req = new UpdateConfigurationTemplateRequest(applicationName, templateName);
   
    req.setOptionSettings(Arrays.asList(template.getOptionSettings()));
   
    return getService().updateConfigurationTemplate(req);
  }
View Full Code Here

Examples of br.com.ingenieux.mojo.beanstalk.ConfigurationTemplate

   
    return null;
  }

  CreateConfigurationTemplateResult createConfiguration(String templateName) {
    ConfigurationTemplate template = getConfigurationTemplate(templateName);
   
    CreateConfigurationTemplateRequest req = new CreateConfigurationTemplateRequest(applicationName, templateName);
   
    req.setSolutionStackName(template.getSolutionStack());
    req.setOptionSettings(Arrays.asList(template.getOptionSettings()));
   
    return getService().createConfigurationTemplate(req);
  }
View Full Code Here

Examples of org.rhq.core.domain.configuration.definition.ConfigurationTemplate

    return null;
  }

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

Examples of org.rhq.core.domain.configuration.definition.ConfigurationTemplate

    return componentType;
  }

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

Examples of org.rhq.core.domain.configuration.definition.ConfigurationTemplate

        for (ConfigurationTemplateDescriptor templateDescriptor : descriptor.getTemplate()) {
            configurationDefinition.putTemplate(parseTemplate(templateDescriptor));
        }

        ConfigurationTemplate defaultTemplate = initDefaultTemplate(configurationDefinition);
        configurationDefinition.putTemplate(defaultTemplate);

        Configuration defaultConfiguration = defaultTemplate.getConfiguration();
        parseProperties(descriptor, defaultConfiguration, configurationDefinition);
        ConfigurationUtility.normalizeConfiguration(defaultConfiguration, configurationDefinition);

        return configurationDefinition;
    }
View Full Code Here

Examples of org.rhq.core.domain.configuration.definition.ConfigurationTemplate

            return org.rhq.core.domain.configuration.definition.ConfigurationFormat.STRUCTURED_AND_RAW;
        }
    }

    private static ConfigurationTemplate initDefaultTemplate(ConfigurationDefinition configurationDefinition) {
        ConfigurationTemplate defaultTemplate = configurationDefinition.getDefaultTemplate();
        if (defaultTemplate == null) {
            // TODO: Not everything should have a default template... only stuff that has default values
            defaultTemplate = new ConfigurationTemplate(ConfigurationTemplate.DEFAULT_TEMPLATE_NAME,
                "the default template");
            Configuration defaultConfiguration = new Configuration();
            defaultTemplate.setConfiguration(defaultConfiguration);
        }

        defaultTemplate.setDefault(true);
        return defaultTemplate;
    }
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.