Package java.util

Examples of java.util.Properties.keySet()


        for (String refLangKey : referenceLanguages) {
          Properties properties = i18nMgr.getPropertiesWithoutResolvingRecursively(i18nMgr.getLocaleOrNull(refLangKey), bundleName);
          if (properties == null) {
            throw new OLATRuntimeException("Invalid reference language::" + refLangKey, null);
          } else {
            for (Object keyObj : properties.keySet()) {
              String key = (String) keyObj;
              allValidKeys.add(key);
            }           
          }
        } //for
View Full Code Here


        }

        //look after all valid keys in given lang in Head
       
        Properties targetProperties = i18nMgr.getPropertiesWithoutResolvingRecursively(locale, bundleName);
        Set<Object> targetLangBundleKeys = targetProperties.keySet();
        Properties oldProps = new Properties();
        FileInputStream is;
        try {
          is = new FileInputStream(bundleToUse);
          oldProps.load(is);
View Full Code Here

      ClassLoader tcl = Thread.currentThread().getContextClassLoader();

      Properties authProps = this.getAuthenticatorsFromJndi();
      if (authProps != null)
      {
         Set keys = authProps.keySet();
         Iterator iter = keys != null ? keys.iterator() : null;
         while (iter != null && iter.hasNext())
         {
            String key = (String)iter.next();
            String authenticatorStr = (String)authProps.get(key);
View Full Code Here

   public static void main(String[] args)
      throws Exception
   {
      log.debug("System Properties");
      Properties sysprops = System.getProperties();
      for (Object key : sysprops.keySet())
         log.debug("  " + key + "=" + sysprops.getProperty((String) key));

      // read the client class from args
      String clientClass = null;
      String clientName = null;
View Full Code Here

      log.debug("command proto type properties: " + cmdProps);
      Properties props = new Properties();
      props.load(input);
      input.close();

      Iterator iter = props.keySet().iterator();
      while (iter.hasNext())
      {
         String name = (String) iter.next();
         String typeName = props.getProperty(name);
         Class type = Class.forName(typeName);
View Full Code Here

   
    // get tips boundary initialize a shuffled list of all possible tip numbers
    int numbTips = -1;
    // search in property file from this package for all questions
    Properties propertiesFile = I18nManager.getInstance().getResolvedProperties(trans.getLocale(), trans.getPackageName());
    Set keys =  propertiesFile.keySet();
    for (Iterator iterator = keys.iterator(); iterator.hasNext();) {
      String key = (String) iterator.next();
      // Questions start with 'Q-'
      if (key.startsWith("Q-")) numbTips++;
    }
View Full Code Here

      /* Only attempt to re-encrypt user attributes if users key is loaded */
      if ("automatic".equals(Property.getProperty(new SystemConfigKey("security.privateKeyMode")))) {
        if(PublicKeyStore.getInstance().hasLoadedKey(user.getPrincipalName())) {
          PublicKeyStore.getInstance().removeKeys(user.getPrincipalName());
          PublicKeyStore.getInstance().verifyPrivateKey(user.getPrincipalName(), setPasswordForm.getNewPassword().toCharArray());
          for(Iterator i = confidentialAttributes.keySet().iterator(); i.hasNext(); ) {
            String n = (String)i.next();
            AttributeDefinition attrDef = (AttributeDefinition) userAttributes.getDefinition(n);
            if (attrDef.getVisibility() == AttributeDefinition.USER_CONFIDENTIAL_ATTRIBUTE) {
              Property.setProperty(new UserAttributeKey(user, n),
                confidentialAttributes.getProperty(n),
View Full Code Here

        if (props.size() < 1) {
            return;
        }
       
        synchronized (messages) {
            Iterator names = props.keySet().iterator();
            while (names.hasNext()) {
                String key = (String) names.next();
                if (log.isTraceEnabled()) {
                    log.trace("  Saving message key '" + messageKey(localeKey, key));
                }
View Full Code Here

            buffer.append("Category=");
            buffer.append(cats[i]);
            Properties props = getProperties(cats[i],false);
            if (props != null) {
                buffer.append("\n");
                Iterator nit = props.keySet().iterator();
                while (nit.hasNext()) {
                    String name = (String) nit.next();
                    String value = props.getProperty(name);
                    buffer.append("  ");
                    buffer.append(name);
View Full Code Here

   
    protected SortedMap getSortedProperties(String categoryName,boolean includeParent) {
        Properties props = getProperties(categoryName,includeParent);
        SortedMap sm = new TreeMap();
        if (props != null) {
            Iterator nit = props.keySet().iterator();
            while (nit.hasNext()) {
                String name = (String) nit.next();
                String value = props.getProperty(name);
                sm.put(name,value);
            }
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.