Package com.webobjects.foundation

Examples of com.webobjects.foundation.NSDictionary$_JavaNSDictionaryMapEntry


                _context.takeValueForInferrableKey(lookFromSettings(), D2WModel.LookKey);
            }
            _context.takeValueForKey(_context.task() + "CurrentObject", D2WComponent
                    .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


                 
                  // Get contents of indexModel file
                  String string = ERXStringUtilities.stringFromResource(name, "indexModel", bundle);
                 
                  // Convert file contents into nested NSDictionary
                  NSDictionary dict = (NSDictionary)NSPropertyListSerialization.propertyListFromString(string);
                 
                  // Create the lucene index with name and dictionary definition
                  addIndex(name, dict);
                  log.info("Added index: " + name);
              }
View Full Code Here

    File file = (File) n.object();
    loadModel(file.toURI().toURL());
  }

  private void loadModel(URL url) {
    NSDictionary def = (NSDictionary) NSPropertyListSerialization.propertyListWithPathURL(url);
    for (Enumeration keys = def.allKeys().objectEnumerator(); keys.hasMoreElements();) {
      String key = (String) keys.nextElement();
      NSDictionary indexDef = (NSDictionary) def.objectForKey(key);
      addIndex(key, indexDef);
    }
  }
View Full Code Here

        return _fileList;
    }

    private String retrieveFileList() {
        try {
            NSDictionary aDict = RemoteBrowseClient.fileListForStartingPathHost(startingPath, host, showFiles);
            _fileList = (NSArray) aDict.valueForKey("fileArray");
            isRoots = (aDict.valueForKey("isRoots") != null) ? true : false;
            startingPath = (String) aDict.valueForKey("filepath");
            errorMsg = null;
        } catch (MonitorException me) {
            if (isRoots)
                startingPath = null;
            NSLog.err.appendln("Path Wizard Error: " + me.getMessage());
View Full Code Here

    }

    public NSDictionary settings() {
        String pc = d2wContext().dynamicPage();
        if(pc != null) {
            return new NSDictionary(pc, "parentPageConfiguration");
        }
        return null;
    }
View Full Code Here

     * Gets the stats for the current page.
     * @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) {
                    events = new NSMutableArray();
                    result.setObjectForKey(events, statsGroup);
                }
                events.addObject(statsDict.objectForKey(key));
            }
        }
        return result;
    }
View Full Code Here

        response.appendContentString("</" + elementName + ">");

        addRequiredWebResources(response, context);
//        super.appendToResponse(response, context);
       
        NSDictionary options = createAjaxOptions(component);
       
        Object frequency = valueForBinding("frequency", component);
        String observeFieldID = (String) valueForBinding("observeFieldID", component);
       
        boolean skipFunction = frequency == null && observeFieldID == null && booleanValueForBinding("skipFunction", false, component);

        if(!skipFunction) {
          AjaxUtils.appendScriptHeader(response);
          if(frequency != null) {
            boolean isNotZero = true;
            try {
              float numberFrequency = ERXValueUtilities.floatValue(frequency);
              if(numberFrequency == 0.0) {
                isNotZero = false;
              }
            } catch (RuntimeException e) {
              throw new IllegalStateException("Error parsing float from value : <" + frequency + ">");
            }
            if(isNotZero) {
              boolean canStop = false;
              boolean stopped = false;
              if(associations().objectForKey("stopped") != null) {
                canStop = true;
                stopped = booleanValueForBinding("stopped", false, component);
              }
              response.appendContentString("MTAUC.registerPeriodic('" + id + "'," + canStop + "," + stopped + ",");
              AjaxOptions.appendToResponse(options, response, context);   
              response.appendContentString(");");
            }
          }
         
          if(observeFieldID != null) {
            boolean fullSubmit = booleanValueForBinding("fullSubmit", false, component);
            AjaxObserveField.appendToResponse(response, context, this, observeFieldID, false, id, fullSubmit, createObserveFieldOptions(component));
          }

          response.appendContentString("MTAUC.register('" + id + "'");
          NSDictionary nonDefaultOptions = AjaxUpdateContainer.removeDefaultOptions(options);
          if (nonDefaultOptions.count() > 0) {
            response.appendContentString(", ");
            AjaxOptions.appendToResponse(nonDefaultOptions, response, context);
          }
          response.appendContentString(");");
View Full Code Here

         * in the indexModel defintion. Each property is a key or keypath.
         * @param indexDef
         */
        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

     * </span>
     */
    public String displayValueForNull() {
      Object obj = d2wContext().valueForKey("displayValueForNull"); // (1) try Rule
      if(obj == null) {
        NSDictionary ui = d2wContext().attribute().userInfo();
        if(ui != null) {
          obj = ui.valueForKey("displayValueForNull"); // (2) try UserInfo
        }
      }
      return (obj == null) ? null : String.valueOf(obj);    
    }   
View Full Code Here

     * Calculates the actions names for a given context.
     * @param c a D2W context
     * @return the array of array of action names for that context.
     */
    public NSDictionary defaultActions(D2WContext c) {
        NSDictionary actions = new NSDictionary(new Object[] {defaultLeftActions(c), defaultRightActions(c)}, new Object [] {"left", "right"});
        log.debug(actions);
        return actions;
    }
View Full Code Here

TOP

Related Classes of com.webobjects.foundation.NSDictionary$_JavaNSDictionaryMapEntry

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.