Package com.webobjects.directtoweb

Examples of com.webobjects.directtoweb.Assignment


        for(Enumeration e = dictionary().keyEnumerator(); e.hasMoreElements(); ) {
            String key = (String)e.nextElement();
            if(!"componentLevelKeys".equals(key)) {
                Object value = dictionary().valueForKey(key);
                EOQualifier q = EOQualifier.qualifierWithQualifierFormat( "pageConfiguration = '" + _pageConfiguration + "'" , null);
                Assignment a = createAssigment(key, value);
                arr.addObject(new Rule(level, q, a));
            }
        }
        NSArray keys = (NSArray)_dictionary.valueForKey("displayPropertyKeys");
        if(keys != null && keys.count() > 0) {
View Full Code Here


        }
        return arr;
    }

  private Assignment createAssigment(String key, Object value) {
    Assignment a;
    if("true".equals(value) || "false".equals(value)) {
        a = new BooleanAssignment(key, value);
    } else {
        a = new Assignment(key, value);
    }
    return a;
  }
View Full Code Here

                NSDictionary values = (NSDictionary)dictionary().valueForKeyPath("componentLevelKeys." + propertyKey);
                EOQualifier q = EOQualifier.qualifierWithQualifierFormat( "pageConfiguration = '" + _pageConfiguration + "' and propertyKey = '" + propertyKey + "'" , null);
                for (Enumeration e1 = values.keyEnumerator(); e1.hasMoreElements();) {
                    String key = (String)e1.nextElement();
                    Object value = values.objectForKey(key);
                    Assignment a = createAssigment(key, value);
                    rules.addObject(new Rule(level, q, a));
                }
            }
        }
    }
View Full Code Here

                //    log.debug("Out of : " + c + " rules, duplicates: " + uniquedRules);
                Rule r = (Rule)rules.objectAtIndex(c);
                if (r != null && r.rhs() != null) {
                    Vector v = (Vector)_uniqueAssignments.get(r.rhs().keyPath());
                    if (v != null) {
                        Assignment unique = assignmentContainedInVector(r.rhs(), v);
                        if (unique == null) {
                            v.addElement(r.rhs());
                        } else if (!(unique == r.rhs())) {
                            r.setRhs(unique);
                            uniquedRules++;
View Full Code Here

                log.debug("Finished Assignment uniquing, got rid of " + uniquedRules + " duplicate assignment(s)");
        }
    }

    protected Assignment assignmentContainedInVector(Assignment a1, Vector v) {
        Assignment containedAssignment = null;
        for (Enumeration e = v.elements(); e.hasMoreElements();) {
            Assignment a2 = (Assignment)e.nextElement();
            if (ERD2WUtilities.assignmentsAreEqual(a1, a2)) {
                containedAssignment = a2; break;
            }
        }
        return containedAssignment;
View Full Code Here

        return null;
    }
    public WOComponent addRule() {
        ERD2WExtendedRule rule = new ERD2WExtendedRule();
        rule.setAuthor(50);
        rule.setRhs(new Assignment("test", null));
        group.insertObjectAtIndex(rule, 0);
        setSelectedRule(rule);
        return null;
    }
View Full Code Here

TOP

Related Classes of com.webobjects.directtoweb.Assignment

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.