Exemplo n.º 1
0
 void configure() {
   if (configuration.containsKey(PROJECT)) {
     project = configuration.getProperty(PROJECT);
   }
   if (configuration.containsKey(FILE)) {
     nodesFile = new File(configuration.getProperty(FILE));
   }
   if (configuration.containsKey(FORMAT)) {
     format = configuration.getProperty(FORMAT);
   }
   if (configuration.containsKey(GENERATE_FILE_AUTOMATICALLY)) {
     generateFileAutomatically =
         Boolean.parseBoolean(configuration.getProperty(GENERATE_FILE_AUTOMATICALLY));
   }
   if (configuration.containsKey(INCLUDE_SERVER_NODE)) {
     includeServerNode = Boolean.parseBoolean(configuration.getProperty(INCLUDE_SERVER_NODE));
   }
   if (configuration.containsKey(REQUIRE_FILE_EXISTS)) {
     requireFileExists = Boolean.parseBoolean(configuration.getProperty(REQUIRE_FILE_EXISTS));
   }
 }
Exemplo n.º 2
0
 public Configuration generateFileAutomatically(boolean generate) {
   this.generateFileAutomatically = generate;
   configuration.put(GENERATE_FILE_AUTOMATICALLY, Boolean.toString(generate));
   return this;
 }
Exemplo n.º 3
0
 public Configuration requireFileExists(boolean require) {
   this.requireFileExists = require;
   configuration.put(REQUIRE_FILE_EXISTS, Boolean.toString(requireFileExists));
   return this;
 }
Exemplo n.º 4
0
 public Configuration includeServerNode(boolean include) {
   this.includeServerNode = include;
   configuration.put(INCLUDE_SERVER_NODE, Boolean.toString(include));
   return this;
 }