Package com.webobjects.foundation

Examples of com.webobjects.foundation.NSArray.objectEnumerator()


                _dictionary.takeValueForKey(o, key);
        }
        String path = "components." + _context.valueForKey("pageName") + ".editors";
        NSArray keys = (NSArray)_allKeys.valueForKeyPath(path);
        if(keys != null) {
            for(Enumeration e = keys.objectEnumerator(); e.hasMoreElements(); ) {
                String key = (String)e.nextElement();
                Object o = _context.valueForKey(key);
                if(o != null)
                    _dictionary.takeValueForKeyPath(o, key);
            }
View Full Code Here


            }
        }
        path = "components." + _context.valueForKey("pageName") + ".supports";
        keys = (NSArray)_allKeys.valueForKeyPath(path);
        if(keys != null) {
            for(Enumeration e = keys.objectEnumerator(); e.hasMoreElements(); ) {
                String key = (String)e.nextElement();
                Object o = _context.valueForKey(key);
                if(o != null)
                    _dictionary.takeValueForKeyPath(o, key);
            }
View Full Code Here

            }
           
            if(_validationInfo != null) {
                NSArray additionalValidationKeys = (NSArray)_validationInfo.objectForKey("additionalValidationKeys");
                if(additionalValidationKeys != null) {
                    for(Enumeration e = additionalValidationKeys.objectEnumerator(); e.hasMoreElements();) {
                        String key = (String)e.nextElement();
                        NSSelector selector = new NSSelector(key);
                        if(selector.implementedByObject(obj)) {
                            try {
                                selector.invoke(obj);
View Full Code Here

        if(_validationInfo != null) {
            NSArray qualifiers = (NSArray)_validationInfo.valueForKeyPath(validationTypeString);
            if(qualifiers != null) {
                ValidationObjectValue values = new ValidationObjectValue(object, value);
                int i = 0;
                for(Enumeration e = qualifiers.objectEnumerator(); e.hasMoreElements();) {
                    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");
View Full Code Here

      Properties dest = source != null ? (Properties) source.clone() : new Properties();
      NSArray additionalConfigurationFiles = ERXProperties.pathsForUserAndBundleProperties(false);

      if (additionalConfigurationFiles.count() > 0) {
        for (Enumeration configEnumerator = additionalConfigurationFiles.objectEnumerator(); configEnumerator.hasMoreElements();) {
          String configFile = (String)configEnumerator.nextElement();
          File file = new File(configFile);
          if (file.exists() && file.isFile() && file.canRead()) {
            try {
              Properties props = ERXProperties.propertiesFromFile(file);
View Full Code Here

    @SuppressWarnings("javadoc")
  public static String pathForPropertiesUnderProjectPath(String projectPath) {
        String path = null;
        final NSArray supportedPropertiesPaths = new NSArray(new Object[]
                                        {"/Properties", "/Resources/Properties"});
        Enumeration e = supportedPropertiesPaths.objectEnumerator();
        while (e.hasMoreElements()) {
            File file = new File(projectPath + (String) e.nextElement());
            if (file.exists()  &&  file.isFile()  &&  file.canRead()) {
                try {
                    path = file.getCanonicalPath();
View Full Code Here

        return destinationDisplayKey;
    }

    public EOEntity entityWithEntityAndKeyPath(EOEntity entity, String keyPath) {
        NSArray keys = NSArray.componentsSeparatedByString(keyPath, ".");
        Enumeration keysEnumerator = keys.objectEnumerator();
        String key = null;
        EOEntity result = entity;

        while (keysEnumerator.hasMoreElements()) {
            key = (String) keysEnumerator.nextElement();
View Full Code Here

                dictionary.setObjectForKey(o, key);
        }
        String path = "components." + dictionary.objectForKey("componentName") + ".editors";
        NSArray keys = (NSArray)_allKeys.valueForKeyPath(path);
        if(keys != null) {
            for(Enumeration e = keys.objectEnumerator(); e.hasMoreElements(); ) {
                String key = (String)e.nextElement();
                Object o = _context.valueForKey(key);
                if(o != null)
                    dictionary.setObjectForKey(o, key);
            }
View Full Code Here

            }
        }
        path = "components." + dictionary.objectForKey("componentName") + ".supports";
        keys = (NSArray)_allKeys.valueForKeyPath(path);
        if(keys != null) {
            for(Enumeration e = keys.objectEnumerator(); e.hasMoreElements(); ) {
                String key = (String)e.nextElement();
                Object o = _context.valueForKey(key);
                if(o != null)
                    dictionary.setObjectForKey(o, key);
            }
View Full Code Here

    }
   
    public WOComponent selectAll() {
        NSMutableArray selectedObjects = new NSMutableArray();
        NSArray list = filteredObjects();
        for (Enumeration e = list.objectEnumerator(); e.hasMoreElements();) {
            selectedObjects.addObject(e.nextElement());
        }
        setSelectedObjects(selectedObjects);
        return context().page();
    }
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.