Examples of TemplateBuilder


Examples of org.jclouds.compute.domain.TemplateBuilder

        String hardwareId = getHardwareId(exchange);

        if (group == null) {
            throw new CamelExchangeException("Group must be specific in the URI or as exchange property for the destroy node operation.", exchange);
        }
        TemplateBuilder builder = computeService.templateBuilder();
        builder.any();

        if (locationId != null) {
            builder.locationId(locationId);
        }
        if (imageId != null) {
            builder.imageId(imageId);
        }
        if (hardwareId != null) {
            builder.hardwareId(hardwareId);
        }

        try {
            Set<? extends NodeMetadata> nodeMetadatas = computeService.createNodesInGroup(group, 1, builder.build());
            exchange.getOut().setBody(nodeMetadatas);
            exchange.getOut().setHeaders(exchange.getIn().getHeaders());
        } catch (RunNodesException e) {
            throw new CamelExchangeException("Error creating jclouds node.", exchange, e);
        }
View Full Code Here

Examples of org.msgpack.template.builder.TemplateBuilder

      register(targetClass, tmpl);
      return tmpl;
  }

  // find match TemplateBuilder
  TemplateBuilder builder = chain.select(targetClass, true);
  if (builder != null) {
      if (forceLoad) {
    tmpl = builder.loadTemplate(targetClass);
    if (tmpl != null) {
        register(targetClass, tmpl);
        return tmpl;
    }
      }

      tmpl = builder.buildTemplate(targetClass);
      if (tmpl != null) {
    register(targetClass, tmpl);
    return tmpl;
      }
  }
View Full Code Here

Examples of org.pirkaengine.core.template.TemplateBuilder

   
    private Template build(String templateFileName, File file, Charset charset) throws ParseException, PirkaLoadException, TemplateNotFoundException,
            FileNotFoundException {
        if (isDebugEnabled()) debug("build: " + file.getAbsolutePath());
        if (!file.exists()) throw new TemplateNotFoundException("Not Found template: " + file.getAbsolutePath());
        TemplateBuilder builder = new TemplateBuilder(this);
        Template template = builder.build(templateFileName, file, charset);
        return template;
    }
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.