Package nl.chess.it.util.config

Examples of nl.chess.it.util.config.ConfigValidationResult


      try {
        prop.load(new FileInputStream(file));

        prop.setProperty("configurationDir", path);
        config = new Configuration(prop);
        ConfigValidationResult configResult = config
            .validateConfiguration();
        if (configResult.thereAreErrors()) {
          // display errors here
          System.out.println("Errors in configuration");

          for (Iterator iter = configResult.getErrors().iterator(); iter
              .hasNext();) {
            System.out.println(" > " + iter.next());
          }

          System.exit(1);
View Full Code Here


      return getString("configurationDir");
    }

  @SuppressWarnings("unchecked")
  public void validate() {
    ConfigValidationResult configResult = this.validateConfiguration();

    if (configResult.thereAreErrors()) {
      System.out.println("Errors in configuration");

      for (Iterator iter = configResult.getErrors().iterator(); iter.hasNext();) {
        System.out.println(" > " + iter.next());
      }

      System.exit(1);
    }

    if (configResult.thereAreUnusedProperties()) {
      System.out.println("Unused properties");

      for (Iterator iter = configResult.getUnusedProperties().iterator(); iter.hasNext();) {
        System.out.println(" > " + iter.next());
      }
    }

  }
View Full Code Here

    return getString("configurationDir");
  }

  @SuppressWarnings("unchecked")
  public void validate() {
    final ConfigValidationResult configResult = this.validateConfiguration();

    if (configResult.thereAreErrors()) {
      System.out.println("Errors in configuration");

      for (final Iterator iter = configResult.getErrors().iterator(); iter.hasNext();) {
        System.out.println(" > " + iter.next());
      }

      System.exit(1);
    }

    if (configResult.thereAreUnusedProperties()) {
      System.out.println("Unused properties");

      for (final Iterator iter = configResult.getUnusedProperties().iterator(); iter.hasNext();) {
        System.out.println(" > " + iter.next());
      }
    }

  }
View Full Code Here

      try {
        prop.load(new FileInputStream(file));

        prop.setProperty("configurationDir", path);
        config = new Configuration(prop);
        final ConfigValidationResult configResult = config.validateConfiguration();
        if (configResult.thereAreErrors()) {
          // display errors here
          System.out.println("Errors in configuration");

          for (final Iterator iter = configResult.getErrors().iterator(); iter.hasNext();) {
            System.out.println(" > " + iter.next());
          }

          System.exit(1);
        }
View Full Code Here

TOP

Related Classes of nl.chess.it.util.config.ConfigValidationResult

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.