Package com.webobjects.foundation

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


     */
    @Override
    public Object fireNow(D2WContext c) {
        Object result = null;
        NSArray rules = (NSArray)value();
        Enumeration ruleEnumerator = rules.objectEnumerator();
        Rule rule;
        while (ruleEnumerator.hasMoreElements()) {
            rule = (Rule)ruleEnumerator.nextElement();
            EOQualifierEvaluation eval = rule.lhs();
            log.debug("Qualifier eval: \n" + eval);
View Full Code Here


        objectsToFilter = EOQualifier.filteredArrayWithQualifier(objectsToFilter, qualifier);

        // and then we need to add back in any updated objects that now DO match the qualifier that didn't originally match the qualifier
        NSArray updatedObjects = ERXEOControlUtilities.updatedObjects(editingContext, entityNames, qualifier);
        if (updatedObjects.count() > 0) {
          Enumeration updatedObjectsEnum = updatedObjects.objectEnumerator();
          while (updatedObjectsEnum.hasMoreElements()) {
            Object obj = updatedObjectsEnum.nextElement();
            if (!objectsToFilter.containsObject(obj)) {
              if (cloneMatchingObjects == null) {
                cloneMatchingObjects = objectsToFilter.mutableClone();
View Full Code Here

    protected static NSDictionary _dictionaryFromFile(File file) {
        NSDictionary model = null;
        try {
            model = Services.dictionaryFromFile(file);
            NSArray rules = (NSArray)model.objectForKey("rules");
            Enumeration e = rules.objectEnumerator();
            while(e.hasMoreElements()) {
                NSMutableDictionary dict = (NSMutableDictionary)e.nextElement();
                if("com.webobjects.directtoweb.Rule".equals(dict.objectForKey("class"))) {
                    dict.setObjectForKey("ERD2WExtendedRule", "class");
                }
View Full Code Here

    }

    public void initializeDimensionArrayFromBindings(String dimension) {
        NSArray keypaths = ERXValueUtilities.arrayValue(valueForBinding("keysIn" + dimension));
        if(keypaths != null && keypaths.count() > 0) {
            for (Enumeration en = keypaths.objectEnumerator(); en.hasMoreElements(); ) {
                String keypath = (String)en.nextElement();
                DRMasterCriteria crit = model().masterCriteriaForKeyPath(keypath);
                if(crit != null) {
                    DRGroup group = model().groupForMasterCriteria(crit);
                    if("Z".equals(dimension))
View Full Code Here

        for (i = 0; i < cnt; i++) {
            Number ky = Integer.valueOf(i);
            //OWDebug.println(1, "ky:"+ ky);
            NSArray attsForDepth = (NSArray)_flatAttributeDepthDict.objectForKey(ky);
            Enumeration anEnum = attsForDepth.objectEnumerator();

            while (anEnum.hasMoreElements()) {
                DRAttribute att = (DRAttribute)anEnum.nextElement();

                //OWDebug.println(1, "att: "+ att);
View Full Code Here

            NSMutableDictionary unknownApps = _unknownApplications;
            // Should make this configurable?
            NSTimestamp cutOffDate = new NSTimestamp(System.currentTimeMillis() - 45000);

            NSArray unknownAppKeys = unknownApps.allKeys();
            for (Enumeration e = unknownAppKeys.objectEnumerator(); e.hasMoreElements(); ) {
                String unknownAppKey = (String) e.nextElement();
                NSMutableDictionary appDict = (NSMutableDictionary) unknownApps.valueForKey(unknownAppKey);
                if (appDict != null) {
                    NSArray appDictKeys = appDict.allKeys();
                    for (Enumeration e2 = appDictKeys.objectEnumerator(); e2.hasMoreElements(); ) {
View Full Code Here

            for (Enumeration e = unknownAppKeys.objectEnumerator(); e.hasMoreElements(); ) {
                String unknownAppKey = (String) e.nextElement();
                NSMutableDictionary appDict = (NSMutableDictionary) unknownApps.valueForKey(unknownAppKey);
                if (appDict != null) {
                    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);
                        }
View Full Code Here

       
        if (tableName != null) {
            NSArray entities = ERXUtilities.entitiesForModelGroup(modelGroup(ec));
            tableName = tableName.toLowerCase();

            for (Enumeration e = entities.objectEnumerator(); e.hasMoreElements();) {
              EOEntity entity = (EOEntity)e.nextElement();
              if (entity.externalName() != null)
              {
                  String lowercaseTableName = entity.externalName().toLowerCase();
                    if (tableName.equals(lowercaseTableName))
View Full Code Here

    // keys: 'groups', 'criteriaList':
    //
    public NSMutableDictionary childrenFromGroupCriteriaList() {
        DRCriteria crit;
        NSArray crits = _masterCriteria.criteriaLookupDict().allValues();
        Enumeration anEnum = crits.objectEnumerator();
        NSMutableDictionary recGrpDict = new NSMutableDictionary();

        while (anEnum.hasMoreElements()) {
            crit = (DRCriteria)anEnum.nextElement();
            DRRecordGroup recGrp = DRRecordGroup.withCriteriaGroupParent(crit, this, null);
View Full Code Here

    public Object fireNow(D2WContext c) {
        String path = keyPath();
        if("displayPropertyKeys".equals(path)) {
            NSArray keys = (NSArray) value();
            NSMutableArray result = new NSMutableArray();
            for (Enumeration enumerator = keys.objectEnumerator(); enumerator.hasMoreElements();) {
                String key = (String) enumerator.nextElement();
                if(key.startsWith("@")) {
                    key = key.substring(1);
                    c.setPropertyKey(key);
                    String keyPath = (String) c.valueForKey("restrictedChoiceKey");
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.