Package org.springframework.xd.module

Examples of org.springframework.xd.module.ModuleType


    String path = Paths.build(pathPrefix, deploymentUnit.getName(), Paths.MODULES);
    List<String> modules = getClient().getChildren().forPath(path);
    Collection<ModuleDeploymentStatus> results = new ArrayList<ModuleDeploymentStatus>();
    for (String module : modules) {
      String deploymentUnitName;
      ModuleType type;
      String label;
      int moduleSequence;
      String container;

      if (deploymentUnit instanceof Stream) {
View Full Code Here



  @Override
  public ModuleOptionsMetadata resolve(ModuleDefinition moduleDefinition) {
    List<ModuleOptionsMetadata> moms = new ArrayList<ModuleOptionsMetadata>();
    ModuleType type = moduleDefinition.getType();
    if (type == source || type == processor) {
      moms.add(new PojoModuleOptionsMetadata(OutputOptionsMetadata.class, conversionService));
    }
    if (type == sink || type == processor) {
      moms.add(new PojoModuleOptionsMetadata(InputOptionsMetadata.class, conversionService));
View Full Code Here

  public ModuleDefinition compose(String name, ModuleType typeHint, String dslDefinition) {
    // TODO: pass typeHint to parser (XD-2343)
    List<ModuleDescriptor> parseResult = this.parser.parse(name, dslDefinition, module);

    ModuleType type = this.determineType(parseResult);
    if (registry.findDefinition(name, type) != null) {
      throw new ModuleAlreadyExistsException(name, type);
    }

    // TODO: XD-2284 need more than ModuleDefinitions (need to capture passed in options, etc)
View Full Code Here

    Assert.isTrue(modules != null && modules.size() > 0, "at least one module required");
    if (modules.size() == 1) {
      return modules.get(0).getType();
    }
    Collections.sort(modules);
    ModuleType firstType = modules.get(0).getType();
    ModuleType lastType = modules.get(modules.size() - 1).getType();
    boolean hasInput = firstType != ModuleType.source;
    boolean hasOutput = lastType != ModuleType.sink;
    if (hasInput && hasOutput) {
      return ModuleType.processor;
    }
View Full Code Here

    originalFile.renameTo(backup);
    BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(backup), "UTF-8"));

    PrintStream out = new PrintStream(new FileOutputStream(originalFile), false, "UTF-8");

    ModuleType type = null;
    String name = null;
    int openingLineNumber = 0;
    int ln = 1;
    for (String line = reader.readLine(); line != null; line = reader.readLine(), ln++) {
      Matcher startMatcher = FENCE_START_REGEX.matcher(line);
View Full Code Here

  @Override
  public void cleanup() {
    Collections.reverse(modules);
    for (String m : modules) {
      String[] parts = m.split(":");
      ModuleType type = ModuleType.valueOf(parts[0]);
      String name = parts[1];
      delete(name, type);
    }
  }
View Full Code Here

TOP

Related Classes of org.springframework.xd.module.ModuleType

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.