Package com.webobjects.foundation

Examples of com.webobjects.foundation.NSMutableDictionary


    result = (NSMutableArray) result.valueForKey("@unique");
    return result;
  }

  public NSDictionary editors() {
    NSMutableDictionary result = new NSMutableDictionary();
    NSArray editors = (NSArray) componentConfiguration().objectForKey("editors");
    if (editors != null) {
      for (Enumeration iter = editors.objectEnumerator(); iter.hasMoreElements();) {
        String key = (String) iter.nextElement();
        NSDictionary dict = (NSDictionary) configuration.editors().objectForKey(key);
        if (dict != null) {
          result.setObjectForKey(dict, key);
        }
      }
    }
    return result;
  }
View Full Code Here


  @Override
  public NSMutableDictionary fetchRow() {
    if (!_fetchInProgress) {
      return null;
    }
    NSMutableDictionary row = null;
    if (hasMoreRowsToReturn()) {
      try {
        int docId = _fetchedDocs.scoreDocs[_fetchIndex++].doc;
        Document doc = searcher().doc(docId);
        EOClassDescription cd = EOClassDescription.classDescriptionForEntityName(_entity.name());
        NSMutableDictionary dict = cd._newDictionaryForProperties();
        for (IndexAttribute attr : _indexAttributes) {
          String name = attr.attribute().name();
          String columnName = attr.attribute().columnName();
          Field field = doc.getField(columnName);
          Object value = null;
          if (field != null) {
            if (field.isBinary()) {
              value = new NSData(field.getBinaryValue());
            } else {
              String stringValue = field.stringValue();
              value = attr.asEOFValue(stringValue);
            }
            dict.setObjectForKey(value, name);
          } else {
            dict.setObjectForKey(NSKeyValueCoding.NullValue, name);
          }
        }
        row = dict;
      } catch (CorruptIndexException e) {
        throw new ERLuceneAdaptorException("Failed to fetch row: " + e.getMessage(), e);
View Full Code Here

    }

    public boolean passwordExists() { return objectKeyPathValue() != null ? true : false; }

    protected void updateContextValues() {
        NSMutableDictionary userInfo = new NSMutableDictionary();
        userInfo.setObjectForKey(key(), passwordPropertyKey);
        if (_password!=null) {
      userInfo.setObjectForKey(_password, "ERDEditPassword." + key() + ".value");
    } else {
      userInfo.removeObjectForKey("ERDEditPassword." + key() + ".value");
    }
        ERXWOContext.contextDictionary().setObjectForKey(userInfo, "ERDEditPassword");
    }
View Full Code Here

    ajaxOptionsArray.addObject(new AjaxOption("debug", AjaxOption.BOOLEAN));
    ajaxOptionsArray.addObject(new AjaxOption("onShow", AjaxOption.SCRIPT));
    ajaxOptionsArray.addObject(new AjaxOption("onClose", AjaxOption.SCRIPT));
    ajaxOptionsArray.addObject(new AjaxOption("onSelect", AjaxOption.SCRIPT));

    NSMutableDictionary options = AjaxOption.createAjaxOptionsDictionary(ajaxOptionsArray, this);
    options.takeValueForKey(format(), "format");
    options.takeValueForKey(format(), "inputOutputFormat");
    return options;
  }
View Full Code Here

    ajaxOptionsArray.addObject(new AjaxOption("evalScripts", AjaxOption.BOOLEAN));
    ajaxOptionsArray.addObject(new AjaxOption("useSpinner", AjaxOption.BOOLEAN));
    ajaxOptionsArray.addObject(new AjaxOption("spinnerTarget", AjaxOption.STRING));
    ajaxOptionsArray.addObject(new AjaxOption("spinnerOptions", AjaxOption.DICTIONARY));
   
    NSMutableDictionary options = AjaxOption.createAjaxOptionsDictionary(ajaxOptionsArray, component, associations());
    options.setObjectForKey("'" + _url + "'", "url");
    options.setObjectForKey("'" + _updateContainerID + "'", "update");
    options.setObjectForKey("'get'", "method");

    if (options.objectForKey("async") == null) {
      options.setObjectForKey("true", "async");
    }   
    if (options.objectForKey("evalScripts") == null) {
      options.setObjectForKey("true", "evalScripts");
    }
   
    AjaxUpdateContainer.expandInsertionFromOptions(options, this, component);
    return options;
View Full Code Here

    }

    String isRoots = aResponse.headerForKey("isRoots");
    String filepath = aResponse.headerForKey("filepath");

    NSMutableDictionary aDict = new NSMutableDictionary();
    aDict.takeValueForKey(isRoots, "isRoots");
    aDict.takeValueForKey(filepath, "filepath");
    aDict.takeValueForKey(anArray, "fileArray");

    return aDict;
  }
View Full Code Here

    protected NSDictionary snapshotsGroupedByEntity(NSArray objects, EOObjectStoreCoordinator osc) {
      if (objects == null || objects.count() == 0) {
        return NSDictionary.EmptyDictionary;
      }

      NSMutableDictionary result = new NSMutableDictionary();
      NSMutableDictionary dbcs = new NSMutableDictionary();

      for (Enumeration gids = objects.objectEnumerator(); gids.hasMoreElements();) {
        EOGlobalID gid = (EOGlobalID) gids.nextElement();
        if (gid instanceof EOKeyGlobalID) {
          EOKeyGlobalID globalID = (EOKeyGlobalID) gid;
          String entityName = globalID.entityName();
          String key = entityName + "/" + System.identityHashCode(osc);
          EODatabaseContext dbc = (EODatabaseContext) dbcs.objectForKey(key);
          if (dbc == null) {
            dbc = ERXEOAccessUtilities.databaseContextForEntityNamed(osc, entityName);
            dbcs.setObjectForKey(dbc, key);
          }
          NSMutableArray snapshotsForEntity = (NSMutableArray) result.objectForKey(entityName);
          if (snapshotsForEntity == null) {
            snapshotsForEntity = new NSMutableArray();
            result.setObjectForKey(snapshotsForEntity, entityName);
View Full Code Here

    // Now we've cached the new value remove it from the newSiteConfig.
    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.
    siteConfig().updateValues(newValues);
   
    // OK, let's check what needs to be done with the password. If we've got a new one set that, otherwise
View Full Code Here

    ajaxOptionsArray.addObject(new AjaxOption("borderColor", AjaxOption.STRING));
    ajaxOptionsArray.addObject(new AjaxOption("panelHeight", AjaxOption.NUMBER));
    ajaxOptionsArray.addObject(new AjaxOption("onHideTab", AjaxOption.SCRIPT));
    ajaxOptionsArray.addObject(new AjaxOption("onShowTab", AjaxOption.SCRIPT));
    ajaxOptionsArray.addObject(new AjaxOption("onLoadShowTab", AjaxOption.SCRIPT));
    NSMutableDictionary options = AjaxOption.createAjaxOptionsDictionary(ajaxOptionsArray, this);
    return options;
  }
View Full Code Here

    ajaxOptionsArray.addObject(new AjaxOption("ghost", Boolean.FALSE, AjaxOption.BOOLEAN));
    ajaxOptionsArray.addObject(new AjaxOption("useSpinner", AjaxOption.BOOLEAN));
    ajaxOptionsArray.addObject(new AjaxOption("spinnerTarget", AjaxOption.STRING));
    ajaxOptionsArray.addObject(new AjaxOption("spinnerOptions", AjaxOption.DICTIONARY));

    NSMutableDictionary options = AjaxOption.createAjaxOptionsDictionary(ajaxOptionsArray, this);
   
    return options;
 
  }
View Full Code Here

TOP

Related Classes of com.webobjects.foundation.NSMutableDictionary

Copyright © 2018 www.massapicom. 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.