Package java.util

Examples of java.util.Properties.stringPropertyNames()


        if (logger.isInfoEnabled()) logger.info("Executing startup task [GenerateAddressTypesTableDataStartupTask]");
        Long count = (Long) dao.executeQuery("SELECT COUNT(a) FROM AddressType a").get(0);
        if (count <= 0) {
            if (logger.isInfoEnabled()) logger.info("AddressType table is empty. Generating data...");
            Properties allTypes = addressTypes.entrySet().iterator().next().getValue();
            for (String code : allTypes.stringPropertyNames()) {
                if (logger.isDebugEnabled()) logger.debug("Creating address type [" + code + "]");
                try {
                    AddressType type = new AddressType();
                    type.setType(new I18nText());
                    for (Locale locale : addressTypes.keySet())
View Full Code Here


      try {
        p = getMessagesFromBundle(Application.getClasspathPrefix() + bundle);
      } catch (IOException e) {
        throw new JibeRuntimeException("Could not load message bundles", e);
      }
      for (String msg : p.stringPropertyNames()) {
        messages.put(msg, p.getProperty(msg));
      }
    }
    serverMessagesCache.put(Context.getCurrentContext().getLocale(), messages);
  }
View Full Code Here

    return lifecycleState;
  }

  private void loadMonitoring() {
    Properties systemProps = System.getProperties();
    Set<String> keys = systemProps.stringPropertyNames();
    try {
      if (keys.contains(CONF_MONITOR_CLASS)) {
        String monitorType = systemProps.getProperty(CONF_MONITOR_CLASS);
        Class<? extends MonitorService> klass;
        try {
View Full Code Here

        }
        if (is != null) {
            try {
                Properties props = new Properties();
                props.load(is);
                for (String name : props.stringPropertyNames()) {
                    staticContentTypes.put(name, props.getProperty(name));
                }
            } catch (IOException ex) {
                String message = new org.apache.cxf.common.i18n.Message("STATIC_RESOURCES_MAP_LOAD_FAILURE",
                                                                        BUNDLE).toString();
View Full Code Here

  }

  @SuppressWarnings("unchecked")
  private void loadMonitoring() {
    Properties systemProps = System.getProperties();
    Set<String> keys = systemProps.stringPropertyNames();
    try {
      if (keys.contains(CONF_MONITOR_CLASS)) {
        String monitorType = systemProps.getProperty(CONF_MONITOR_CLASS);
        Class<? extends MonitorService> klass;
        try {
View Full Code Here

       
        // js and css dependencies
        List<String> jsDeps = new ArrayList<String>();
        List<String> cssDeps = new ArrayList<String>();
        Properties depConf = gs.getDependencyConfig();
        for (String key: depConf.stringPropertyNames()) {
            if (key.startsWith("js") || key.startsWith("css")) {
                StringBuilder sb = new StringBuilder(key);
                sb.append("=");
                sb.append(depConf.getProperty(key));
                if (key.startsWith("js"))
View Full Code Here

            }
          }
        }
        argMap.put(arg, argValues.toArray(new String[argValues.size()]));
      }
      for (String key : mainProps.stringPropertyNames()) {
        String[] argNamePair = key.split("\\|");
        String shortArg = '-' + argNamePair[0].trim();
        String longArg = argNamePair.length < 2 ? null : "--" + argNamePair[1].trim();
        if(!argMap.containsKey(shortArg) && (longArg == null || !argMap.containsKey(longArg))) {
          argMap.put(longArg, new String[] { mainProps.getProperty(key) } );
View Full Code Here

                        + propsURL, ioe);
            }
        }

        // only set a property if it has not been set by web start
        for (String propsName : mergeProps.stringPropertyNames()) {
            if (System.getProperties().getProperty(propsName) == null) {
                System.getProperties().setProperty(propsName,
                                                   mergeProps.getProperty(propsName));
            }
        }
View Full Code Here

            Properties properties = new Properties();
            properties.load(stream);
            stream.close();

            List<FileEntry> result = new ArrayList<FileEntry>();
            for (String file : properties.stringPropertyNames()) {
                result.add(new FileEntry(properties.getProperty(file), path + file));
            }
            Collections.sort(result);

            return result;
View Full Code Here

                    Properties props = new Properties();
                    props.load(is);
                    is.close();

                    // Parse the properties
                    Set<String> keys = props.stringPropertyNames();
                    Iterator<String> iter = keys.iterator();
                    while (iter.hasNext()) {
                        String key = iter.next();
                        processMimeType(key, props.getProperty(key));
                    }
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.