Package com.webobjects.foundation

Examples of com.webobjects.foundation.NSMutableDictionary.removeObjectForKey()


    newSiteConfig.values().removeObjectForKey("password");

    // Build a dictionary of new values. Because we might only be updating a few  values (and not the whole
    // SiteConfig) we'll start with all the current values, less the password which we've already cached.
    NSMutableDictionary newValues = siteConfig().values();
    newValues.removeObjectForKey("password");

    // Overwrite and/or add the new incoming values.
    newValues.addEntriesFromDictionary(newSiteConfig.values());

    // Push the complete set of new values into the current SiteConfig object.
View Full Code Here


                    NSArray appDictKeys = appDict.allKeys();
                    for (Enumeration e2 = appDictKeys.objectEnumerator(); e2.hasMoreElements(); ) {
                        String appDictKey = (String) e2.nextElement();
                        NSTimestamp lastLifebeat = (NSTimestamp) appDict.valueForKey(appDictKey);
                        if ( (lastLifebeat != null) && (lastLifebeat.before(cutOffDate)) ) {
                            appDict.removeObjectForKey(appDictKey);
                        }
                    }
                    if (appDict.count() == 0) {
                        unknownApps.removeObjectForKey(unknownAppKey);
                    }
View Full Code Here

      String contextID = wocontext.contextID();
      if (logger.isDebugEnabled()) logger.debug("Saving page for contextID: " + contextID);
      NSMutableDictionary permanentPageCache = _permanentPageCache();
      for (int i = WOApplication.application().permanentPageCacheSize(); _permanentContextIDArray.count() >= i; _permanentContextIDArray.removeObjectAtIndex(0)) {
        String s1 = (String) _permanentContextIDArray.objectAtIndex(0);
        WOComponent page = (WOComponent) permanentPageCache.removeObjectForKey(s1);
        if(storesPageInfo()) {
          pageInfoDictionary().removeObjectForKey(page);
        }
      }
View Full Code Here

   */
  public static EOAdaptorChannel adaptorChannelWithUserAndPassword(String adaptorName, NSDictionary originalConnectionDictionary, String userName, String password) {
    EOAdaptor adaptor = EOAdaptor.adaptorWithName(adaptorName);
    NSMutableDictionary newConnectionDictionary = originalConnectionDictionary.mutableClone();
    if (userName == null) {
      newConnectionDictionary.removeObjectForKey(JDBCAdaptor.UsernameKey);
    }
    else {
      newConnectionDictionary.setObjectForKey(userName, JDBCAdaptor.UsernameKey);
    }
    if (password == null) {
View Full Code Here

    }
    else {
      newConnectionDictionary.setObjectForKey(userName, JDBCAdaptor.UsernameKey);
    }
    if (password == null) {
      newConnectionDictionary.removeObjectForKey(JDBCAdaptor.PasswordKey);
    }
    else {
      newConnectionDictionary.setObjectForKey(password, JDBCAdaptor.PasswordKey);
    }
    adaptor.setConnectionDictionary(newConnectionDictionary);
View Full Code Here

  public static NSDictionary removeDefaultOptions(NSDictionary options) {
    // PROTOTYPE OPTIONS
    NSMutableDictionary mutableOptions = options.mutableClone();
    if ("'get'".equals(mutableOptions.objectForKey("method"))) {
      mutableOptions.removeObjectForKey("method");
    }
    if ("true".equals(mutableOptions.objectForKey("evalScripts"))) {
      mutableOptions.removeObjectForKey("evalScripts");
    }
    if ("true".equals(mutableOptions.objectForKey("asynchronous"))) {
View Full Code Here

    NSMutableDictionary mutableOptions = options.mutableClone();
    if ("'get'".equals(mutableOptions.objectForKey("method"))) {
      mutableOptions.removeObjectForKey("method");
    }
    if ("true".equals(mutableOptions.objectForKey("evalScripts"))) {
      mutableOptions.removeObjectForKey("evalScripts");
    }
    if ("true".equals(mutableOptions.objectForKey("asynchronous"))) {
      mutableOptions.removeObjectForKey("asynchronous");
    }
    return mutableOptions;
View Full Code Here

    }
    if ("true".equals(mutableOptions.objectForKey("evalScripts"))) {
      mutableOptions.removeObjectForKey("evalScripts");
    }
    if ("true".equals(mutableOptions.objectForKey("asynchronous"))) {
      mutableOptions.removeObjectForKey("asynchronous");
    }
    return mutableOptions;
  }

  public NSMutableDictionary createObserveFieldOptions(WOComponent component) {
View Full Code Here

    _disabled = _associations.removeObjectForKey("disabled");
  }

  protected static NSDictionary _processAssociations(NSDictionary associations) {
    NSMutableDictionary mutableAssociations = (NSMutableDictionary) associations;
    WOAssociation action = (WOAssociation) mutableAssociations.removeObjectForKey("action");
    if (action != null) {
      mutableAssociations.setObjectForKey(action, "invokeAction");
    }
    if (!mutableAssociations.containsKey("elementName")) {
      mutableAssociations.setObjectForKey(new WOConstantValueAssociation("div"), "elementName");
View Full Code Here

        }
        else { // remove

            if (isDictionary) {
                _dictionary.removeObjectForKey(masterKey);
            }
            else if (_eo.valueForKey(masterKey) != null) {
                _eo.removeObjectFromBothSidesOfRelationshipWithKey((EOEnterpriseObject) _eo.valueForKey(masterKey), masterKey);
            }
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.