Package com.webobjects.foundation

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


                    NSDictionary info = (NSDictionary)e.nextElement();
                    if(validationLog.isDebugEnabled())
                        validationLog.debug("Validate " + validationTypeString +"."+ property +" with <"+ value + "> on " + object + "\nRule: " + info);
                    if(!validateObjectValueDictWithInfo(values, info, validationTypeString+property+i)) {
                        String message = (String)info.objectForKey("message");
                        String keyPaths = (String)info.objectForKey("keyPaths");
                        property = keyPaths == null ? property : keyPaths;
                        if(validationLog.isDebugEnabled())
                            validationLog.info("Validation failed " + validationTypeString +"."+ property +" with <"+ value + "> on " + object);
                        throw ERXValidationFactory.defaultFactory().createException(object, property, value,message);
                    }
View Full Code Here


                if(attr.userInfo() != null)
                    defaultValue = (String)attr.userInfo().objectForKey(defaultKey);

                if(defaultValue == null && entityInfo != null) {
                    defaultValue = (String)entityInfo.objectForKey(attr.name());
                }
                if(defaultValue != null)
                    setDefaultAttributeValue(attr, defaultValue);
            }
View Full Code Here

                if(rel.userInfo() != null)
                    defaultValue = (String)rel.userInfo().objectForKey(defaultKey);

                if(defaultValue == null && entityInfo != null) {
                    defaultValue = (String)entityInfo.objectForKey(rel.name());
                }
                if(defaultValue != null)
                    setDefaultRelationshipValue(rel, defaultValue);
            }
        }
View Full Code Here

        return "";

      String dictString = new String(bundle.bytesForResourcePath(plist));
      NSDictionary versionDictionary = NSPropertyListSerialization.dictionaryForString(dictString);

      String versionString = (String) versionDictionary.objectForKey(key);
      return versionString == null  ""  :  versionString.trim(); // trim() removes the line ending char
    }

    /** constant string used if Wonder version could not be determined */
    public static final String UNKNOWN_WONDER_VERSION = "Not Available";
View Full Code Here

      ERXProperties._Properties properties = new ERXProperties._Properties();
        NSDictionary argvDict = NSProperties.valuesFromArgv(argv);
        Enumeration e = argvDict.allKeys().objectEnumerator();
        while (e.hasMoreElements()) {
            Object key = e.nextElement();
            properties.put(key, argvDict.objectForKey(key));
        }
        return properties;
    }

    /**
 
View Full Code Here

                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

          NSDictionary dict;
          String path = bundle.resourcePathForLocalizedResourceNamed("d2wclientConfiguration.plist", null);
          if(path != null) {
            dict = ERXDictionaryUtilities.dictionaryFromPropertyList("d2wclientConfiguration", bundle);
            if(dict != null) {
              if(dict.objectForKey("components") != null) {
                components.addEntriesFromDictionary((NSDictionary)dict.objectForKey("components"));
              }
              if(dict.objectForKey("editors") != null) {
                editors.addEntriesFromDictionary((NSDictionary)dict.objectForKey("editors"));
              }
View Full Code Here

          String path = bundle.resourcePathForLocalizedResourceNamed("d2wclientConfiguration.plist", null);
          if(path != null) {
            dict = ERXDictionaryUtilities.dictionaryFromPropertyList("d2wclientConfiguration", bundle);
            if(dict != null) {
              if(dict.objectForKey("components") != null) {
                components.addEntriesFromDictionary((NSDictionary)dict.objectForKey("components"));
              }
              if(dict.objectForKey("editors") != null) {
                editors.addEntriesFromDictionary((NSDictionary)dict.objectForKey("editors"));
              }
            }
View Full Code Here

            dict = ERXDictionaryUtilities.dictionaryFromPropertyList("d2wclientConfiguration", bundle);
            if(dict != null) {
              if(dict.objectForKey("components") != null) {
                components.addEntriesFromDictionary((NSDictionary)dict.objectForKey("components"));
              }
              if(dict.objectForKey("editors") != null) {
                editors.addEntriesFromDictionary((NSDictionary)dict.objectForKey("editors"));
              }
            }
          }
        }
View Full Code Here

            if(dict != null) {
              if(dict.objectForKey("components") != null) {
                components.addEntriesFromDictionary((NSDictionary)dict.objectForKey("components"));
              }
              if(dict.objectForKey("editors") != null) {
                editors.addEntriesFromDictionary((NSDictionary)dict.objectForKey("editors"));
              }
            }
          }
        }
      }
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.