Package com.webobjects.foundation

Examples of com.webobjects.foundation.NSDictionary.keyEnumerator()


                addRulesForPropertyKeys(level, rules, keys);
            } else {
                String propertyKey = (String)o;
                NSDictionary values = (NSDictionary)dictionary().valueForKeyPath("componentLevelKeys." + propertyKey);
                EOQualifier q = EOQualifier.qualifierWithQualifierFormat( "pageConfiguration = '" + _pageConfiguration + "' and propertyKey = '" + propertyKey + "'" , null);
                for (Enumeration e1 = values.keyEnumerator(); e1.hasMoreElements();) {
                    String key = (String)e1.nextElement();
                    Object value = values.objectForKey(key);
                    Assignment a = createAssigment(key, value);
                    rules.addObject(new Rule(level, q, a));
                }
View Full Code Here


    else if (type == AjaxOption.DICTIONARY) {
      if (_value instanceof NSDictionary) {
        NSDictionary dictValue = (NSDictionary) _value;
        StringBuilder sb = new StringBuilder();
        sb.append('{');
        Enumeration keyEnum = dictValue.keyEnumerator();
        while (keyEnum.hasMoreElements()) {
          Object key = keyEnum.nextElement();
          Object value = dictValue.objectForKey(key);
          sb.append(new AjaxValue(key).javascriptValue());
          sb.append(':');
View Full Code Here

                    .keyForGenerationReplacementForVariableNamed("currentObject"));
        }
        NSDictionary nsdictionary = settings();
        if (nsdictionary != null) {
            String s2;
            for (Enumeration enumeration = nsdictionary.keyEnumerator(); enumeration.hasMoreElements(); _context.takeValueForInferrableKey(
                    nsdictionary.valueForKey(s2), s2)) {
                s2 = (String) enumeration.nextElement();
            }

        }
View Full Code Here

     * @return the stats
     */
    public NSDictionary statsForPage() {
        NSMutableDictionary result = new NSMutableDictionary();
        NSDictionary statsDict = ERXStats.statistics();
        for (Enumeration keysEnum = statsDict.keyEnumerator(); keysEnum.hasMoreElements();) {
            String key = (String)keysEnum.nextElement();
            if (key.contains(statsKeyPrefix())) {
                String statsGroup = ERXStringUtilities.firstPropertyKeyInKeyPath(key);
                NSMutableArray events = (NSMutableArray)result.objectForKey(statsGroup);
                if (null == events) {
View Full Code Here

        protected void createAttributes(NSDictionary indexDef) {
          // Get the properties dictionary which is one element of the indexModel dictionary
            NSDictionary properties = (NSDictionary) indexDef.objectForKey("properties");
           
            // For each property in indexModel, create configuration attributes
            for (Enumeration names = properties.keyEnumerator(); names.hasMoreElements();) {
                String propertyName = (String) names.nextElement();
                NSDictionary propertyDefinition = (NSDictionary) properties.objectForKey(propertyName);
                createAttribute(propertyName, propertyDefinition);
            }
        }
View Full Code Here

                        int count = dict.count();
                        EncodedDictionary dictionary = new EncodedDictionary(encodeCount(count, Type.kCFBinaryPlistMarkerDict));
                        objectList.add(dictionary);
   
                        // 2. write keys and values
                        for (Enumeration keyEnum = dict.keyEnumerator(); keyEnum.hasMoreElements(); ) {
                            Object aKey = keyEnum.nextElement();
                            dictionary.addKeyRef(encodeObject(aKey, objectList, uniquingTable));
                            dictionary.addValueRef(encodeObject(dict.objectForKey(aKey), objectList, uniquingTable));
                        }
            }
View Full Code Here

       result = gidful;
     }
     else if (obj instanceof NSDictionary) {
       NSDictionary eoful = (NSDictionary)obj;
       NSMutableDictionary gidful = new NSMutableDictionary();
       Enumeration keyEnum = eoful.keyEnumerator();
       while (keyEnum.hasMoreElements()) {
         Object eofulKey = keyEnum.nextElement();
         Object gidfulKey = ERXEOControlUtilities.convertEOtoGID(eofulKey);
         Object gidfulValue = ERXEOControlUtilities.convertEOtoGID(eoful.objectForKey(eofulKey));
         gidful.setObjectForKey(gidfulValue, gidfulKey);
View Full Code Here

       }
     }
     else if (obj instanceof NSDictionary) {
       NSDictionary gidful = (NSDictionary)obj;
       NSMutableDictionary eoful = new NSMutableDictionary();
       Enumeration keyEnum = gidful.keyEnumerator();
       while (keyEnum.hasMoreElements()) {
         Object gidfulKey = keyEnum.nextElement();
         Object eofulKey = ERXEOControlUtilities.convertGIDtoEO(editingContext, gidfulKey);
         Object eofulValue = ERXEOControlUtilities.convertGIDtoEO(editingContext, gidful.objectForKey(gidfulKey));
         eoful.setObjectForKey(eofulValue, eofulKey);
View Full Code Here

        String result;
        if(getExceptionPageName() != null && ERXValueUtilities.booleanValue(formatAsError())) {
            NSDictionary dict = composeExceptionPageDictionary(event);
            WOComponent page = ERXApplication.instantiatePage(exceptionPageName);

            for(Enumeration keys = dict.keyEnumerator(); keys.hasMoreElements();) {
                String key = (String) keys.nextElement();
                Object value = dict.objectForKey(key);
                try {
                    page.takeValueForKey(value, key);
                } catch(NSKeyValueCoding.UnknownKeyException e) {
View Full Code Here

                EOGeneralAdaptorException  e= (EOGeneralAdaptorException)exception;
                if (e.userInfo()!=null) {
                    Object userInfo=e.userInfo();
                    if (userInfo instanceof NSDictionary) {
                        NSDictionary uid=(NSDictionary)userInfo;
                        for (Enumeration e2=uid.keyEnumerator(); e2.hasMoreElements();) {
                            String key=(String)e2.nextElement();
                            Object value=uid.objectForKey(key);
                            s.append(key + " = " + value + ";\n");
                        }
                    } else {
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.