Examples of NSDictionary


Examples of com.webobjects.foundation.NSDictionary

  public WOActionResults showAction() throws Throwable {
    TaskInfo taskInfo = routeObjectForKey("taskInfo");
    if (TaskInfo.WORKFLOW_PRIME_CHECKED.equals(taskInfo.workflowState())) {
      ERXRouteResults results = (ERXRouteResults)response(taskInfo, ERXKeyFilter.filterWithNone());   
      WOResponse response = results.generateResponse();
      String location = hostName() + ERXRouteUrlUtils.actionUrlForRecord(_context, taskInfo, "results", format().name(), new NSDictionary(), request().isSecure(), request().isSessionIDInRequest());
      response.setHeader(location, "Content-Location");
      response.setStatus(ERXHttpStatusCodes.SEE_OTHER);
      return response;
    }
    return response(taskInfo.workflowState(), ERXKeyFilter.filterWithAttributes());
View Full Code Here

Examples of com.webobjects.foundation.NSDictionary

    public static String valueFromPlistBundleWithKey(NSBundle bundle, String plist, String key) {
      if (bundle == null)
        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
    }
View Full Code Here

Examples of com.webobjects.foundation.NSDictionary

     * </span>
     */
    @SuppressWarnings("javadoc")
  public static NSDictionary dictionaryForKeyWithDefault(final String s, final NSDictionary defaultValue) {
        final String propertyName = getApplicationSpecificPropertyName(s);
    NSDictionary value;
    Object cachedValue = _cache.get(propertyName);
    if (UndefinedMarker.equals(cachedValue)) {
      value = defaultValue;
    } else if (cachedValue instanceof NSDictionary) {
      value = (NSDictionary) cachedValue;
View Full Code Here

Examples of com.webobjects.foundation.NSDictionary

     * </span>
     */
    @SuppressWarnings("javadoc")
  public static Properties propertiesFromArgv(String[] argv) {
      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

Examples of com.webobjects.foundation.NSDictionary

            Object o = e.nextElement();
            if(o instanceof NSArray) {
                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

Examples of org.rococoa.cocoa.foundation.NSDictionary

                NSString.stringWithString("string value"),
                NSNumber.CLASS.numberWithInt(42));
        NSArray keys = NSArray.CLASS.arrayWithObjects(
                NSString.stringWithString("string key"),
                NSString.stringWithString("int key"));
        NSDictionary dictionary = NSDictionary.dictionaryWithObjects_forKeys(objects, keys);
       
        check(dictionary);
    }
View Full Code Here

Examples of org.rococoa.cocoa.foundation.NSDictionary

       
        check(dictionary);
    }
   
    @Test public void testDictionaryWithObjectsAndKeys() {
        NSDictionary dictionary = NSDictionary.dictionaryWithObjectsAndKeys(
                NSString.stringWithString("string value"), NSString.stringWithString("string key"),
                NSNumber.CLASS.numberWithInt(42), NSString.stringWithString("int key"));
       
        check(dictionary);
    }
View Full Code Here

Examples of org.rococoa.cocoa.foundation.NSDictionary

        }
    }

    @Test
    public void testNilReturnValues() {
        NSDictionary dict = NSDictionary.dictionaryWithObjectsAndKeys(
                NSString.stringWithString("Value"), NSString.stringWithString("Key")
        );
        ID id = dict.objectForKey((ID) null);
        assertNull(id);
        NSObject nsObject = dict.objectForKey((NSObject) null);
        assertNull(nsObject);
    }
View Full Code Here

Examples of org.rococoa.cocoa.foundation.NSDictionary

        assertNull(nsObject);
    }

    @Test
    public void testReturnValues() {
        NSDictionary dict = NSDictionary.dictionaryWithObjectsAndKeys(
                NSString.stringWithString("Value"), NSString.stringWithString("Key")
        );
        ID id = dict.objectForKey(NSString.stringWithString("Key").id());
        assertNotNull(id);
        NSObject nsObject = dict.objectForKey(NSString.stringWithString("Key"));
        assertNotNull(nsObject);
    }
View Full Code Here

Examples of org.rococoa.cocoa.foundation.NSDictionary

                    NSString.stringWithString(GROWL_NOTIFICATIONS_DEFAULT),
                    appImage != null ? NSString.stringWithString(GROWL_APP_ICON) : null
            );

            // Make the Dictionary
            NSDictionary regDict = NSDictionary.dictionaryWithObjects_forKeys(objects, keys);

            theCenter.postNotification(
                    GROWL_APP_REGISTRATION, // notificationName
                    null,                   // anObject
                    regDict,                // userInfoDictionary
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.