Examples of objectEnumerator()


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

   */
  @SuppressWarnings("unchecked")
  protected NSArray<T> relevantChanges(EOEditingContext editingContext, NSDictionary dict, String key) {
    NSArray allObjects = (NSArray) dict.objectForKey(key);
    NSMutableArray<T> changedObjects = new NSMutableArray<T>();
    for (Enumeration enumeration = allObjects.objectEnumerator(); enumeration.hasMoreElements();) {
      EOEnterpriseObject eo = (EOEnterpriseObject) enumeration.nextElement();
      String changedEntityName = eo.entityName();
      if (isRelevant(editingContext, changedEntityName)) {
        changedObjects.addObject((T) eo);
        if (!_trackAllChanges) {
View Full Code Here

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

                "displayNameForProperty", "propertyKey"});
        _componentLevelKeys = new NSMutableArray();
        if(componentKeys != null) {
            _componentLevelKeys = componentKeys.mutableClone();
        }
        for(Enumeration e = keys.objectEnumerator(); e.hasMoreElements(); ) {
          String key = (String)e.nextElement();
          if(!_componentLevelKeys.containsObject(key)) {
            _componentLevelKeys.addObject(key);
          }
        }
View Full Code Here

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

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

            }
        }
        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

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

            }
           
            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

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

        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

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

      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

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

    @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

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

        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

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

                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
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.