Package java.util

Examples of java.util.Properties.stringPropertyNames()


            log.info("Starting WSO2 Cartridge Agent...");
            Properties conf = new Properties();
            confFileIPStream = new FileInputStream(CarbonUtils.getCarbonConfigDirPath() +
                    File.separator + "agent.properties");
            conf.load(confFileIPStream);           
            for (String name : conf.stringPropertyNames()) {
          String value = conf.getProperty(name);
          System.setProperty(name, value);
        }
           
            RegistrantDatabase registrantDatabase = new RegistrantDatabase();
View Full Code Here


    }
    if (log.isInfoEnabled()) {
      log.info("Setting config properties into System properties");
    }

    for (String name : properties.stringPropertyNames()) {
      String value = properties.getProperty(name);
      System.setProperty(name, value);
    }
  }
View Full Code Here

      log.config("Loading initial properties from property file: "
        + property_filename);
      try {
        Properties defProps = new Properties();
        defProps.load(new FileReader(property_filename));
        Set<String> prop_keys = defProps.stringPropertyNames();
        for (String key: prop_keys) {
          String value = defProps.getProperty(key).trim();
          if (key.startsWith("--") || key.equals("config-type")) {
            defConfigParams.put(key.trim(), value);
            //defProperties.remove(key);
View Full Code Here

      }
      if (configPath.exists()) {
        Properties props = new Properties();
        props.load(new FileReader(configPath));
        Debug.trace("Loading init.properties file...");
        for (String name: props.stringPropertyNames()) {
          config += name + " = " + props.getProperty(name) + "\n";
        }
        Debug.trace(config);
        Debug.trace("Done.");
        Debug.trace("Loading variables....");
View Full Code Here

      return false;
    }

    if (commandLine.hasOption("hiveconf")) {
      Properties confProps = commandLine.getOptionProperties("hiveconf");
      for (String propKey : confProps.stringPropertyNames()) {
        cmdProperties.setProperty(propKey, confProps.getProperty(propKey));
      }
    }

    return true;
View Full Code Here

                       module.getName() + " part " + part.getName(), ex);
        }

        // go through each property, and set it in the system properties
        // if it is not already set.
        for (String prop : props.stringPropertyNames()) {
            if (!System.getProperties().containsKey(prop)) {
                System.setProperty(prop, props.getProperty(prop));
            }
        }
    }
View Full Code Here

        try {
            InputStream is = this.getClass().getClassLoader().getResourceAsStream("plugins.properties");
            Properties plugins = new Properties();
            plugins.load(is);
            for (String pluginName : plugins.stringPropertyNames()) {
                Class pluginClass = Class.forName(pluginName);
                JdrPlugin plugin = (JdrPlugin) pluginClass.newInstance();
                commands.addAll(plugin.getCommands());
                versionWriter.println(plugin.getPluginId());
            }
View Full Code Here

                .write(LAST_UPDATE_TIME, jobExecution.getLastUpdatedTime().getTime())
                .write(START_TIME, jobExecution.getStartTime().getTime());
        // Write out properties
        generator.writeStartObject(PROPERTIES);
        final Properties params = jobExecution.getJobParameters();
        for (String key : params.stringPropertyNames()) {
            generator.write(key, params.getProperty(key));
        }
        generator.writeEnd();

        // End main object
View Full Code Here

    public Collection<String> getDeployedApplications() throws GlassFishException {
        try {
            CommandExecutorImpl executer = habitat.getService(CommandExecutorImpl.class);
            ActionReport report = executer.executeCommand("list-components");
            Properties props = report.getTopMessagePart().getProps();
            return new ArrayList<String>(props.stringPropertyNames());
        } catch (Exception e) {
            throw new GlassFishException(e);
        }
    }
View Full Code Here

         */
        progOpts.setAuxInput(null);
        try {
            final AsadminInput.InputReader reader = AsadminInput.reader(auxInput);
            final Properties newOptions = reader.settings().get("option");
            for (String propName : newOptions.stringPropertyNames()) {
                newParamMap.add(propName, newOptions.getProperty(propName));
            }
            progOpts.updateOptions(newParamMap);
        } catch (Exception ex) {
            throw new RuntimeException(ex);
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.