Package com.webobjects.foundation

Examples of com.webobjects.foundation.NSArray$Operator


        if(pageKeys == null) {
            _pageLevelKeys = new NSMutableArray(new Object[] {"pageWrapperName", "displayPropertyKeys", "pageName"});
        } else {
            _pageLevelKeys = pageKeys.mutableClone();
        }
        NSArray keys = new NSMutableArray(new Object[] {"componentName", "customComponentName",
                "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


            Object o = _context.valueForKey(key);
            if(o != null)
                _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);
            }
        }
        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 (useValidity()) {
                invokeValidityMethodWithType(VALIDITY_SAVE, obj);
            }
           
            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

        return true;
    }

    public void validateObjectWithUserInfo(EOEnterpriseObject object, Object value, String validationTypeString, String property) {
        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

    }

    public void setDefaultRelationshipValue(EORelationship rel, String defaultValue) {
        String name = rel.name();
        defaultLog.debug("Adding: " + name + "-" + defaultValue);
        NSArray attrs = rel.destinationAttributes();
        if(!rel.isFlattened() && attrs !=  null && attrs.count() == 1) {
            EOAttribute relAttr = (EOAttribute)attrs.objectAtIndex(0);
            if(defaultValue != null) {
                RelationshipDefault d = new RelationshipDefault(name, defaultValue, relAttr.adaptorValueType(), rel.destinationEntity().name());
                _initialDefaultValues.setObjectForKey(d, name);
            }
        }
View Full Code Here

 
  // Reasonable dataset for LineChart, BarChart, BarChart3D, StackedBarChart, StackedBarChart3D, AreaChart, StackedAreaChart
  //
  public NSArray itemSet1() {
    if (_itemSet1 == null) {
      NSArray keys = new NSArray(Arrays.asList("name", "value", "category"));
     
      NSMutableDictionary oneA = new NSMutableDictionary(new NSArray(Arrays.asList("iPhone", Integer.valueOf(100), "01/2011")), keys);
      NSMutableDictionary oneB = new NSMutableDictionary(new NSArray(Arrays.asList("iPhone", Integer.valueOf(150), "02/2011")), keys);
      NSMutableDictionary oneC = new NSMutableDictionary(new NSArray(Arrays.asList("iPhone", Integer.valueOf(200), "03/2011")), keys);

      NSMutableDictionary twoA = new NSMutableDictionary(new NSArray(Arrays.asList("RIM", Integer.valueOf(200), "01/2011")), keys);
      NSMutableDictionary twoB = new NSMutableDictionary(new NSArray(Arrays.asList("RIM", Integer.valueOf(210), "02/2011")), keys);
      NSMutableDictionary twoC = new NSMutableDictionary(new NSArray(Arrays.asList("RIM", Integer.valueOf(215), "03/2011")), keys);

      NSMutableDictionary threeA = new NSMutableDictionary(new NSArray(Arrays.asList("Android", Integer.valueOf(50), "01/2011")), keys);
      NSMutableDictionary threeB = new NSMutableDictionary(new NSArray(Arrays.asList("Android", Integer.valueOf(55), "02/2011")), keys);
      NSMutableDictionary threeC = new NSMutableDictionary(new NSArray(Arrays.asList("Android", Integer.valueOf(110), "03/2011")), keys);

      _itemSet1 = new NSArray(Arrays.asList(twoA, twoB, twoC, oneA, oneB, oneC, threeA, threeB, threeC));
    }
    //System.out.println("itemSet1 = "+_itemSet1);
    return _itemSet1;
  }
View Full Code Here

 
  // "Wrong" dataset for AreaChart
  //
  public NSArray itemSet1a() {
    if (_itemSet1a == null) {
      NSArray keys = new NSArray(Arrays.asList("name", "value", "category"));
     
      NSMutableDictionary oneA = new NSMutableDictionary(new NSArray(Arrays.asList("iPhone", Integer.valueOf(100), "01/2011")), keys);
      NSMutableDictionary oneB = new NSMutableDictionary(new NSArray(Arrays.asList("iPhone", Integer.valueOf(150), "02/2011")), keys);
      NSMutableDictionary oneC = new NSMutableDictionary(new NSArray(Arrays.asList("iPhone", Integer.valueOf(200), "03/2011")), keys);

      NSMutableDictionary twoA = new NSMutableDictionary(new NSArray(Arrays.asList("RIM", Integer.valueOf(200), "01/2011")), keys);
      NSMutableDictionary twoB = new NSMutableDictionary(new NSArray(Arrays.asList("RIM", Integer.valueOf(210), "02/2011")), keys);
      NSMutableDictionary twoC = new NSMutableDictionary(new NSArray(Arrays.asList("RIM", Integer.valueOf(215), "03/2011")), keys);

      NSMutableDictionary threeA = new NSMutableDictionary(new NSArray(Arrays.asList("Android", Integer.valueOf(50), "01/2011")), keys);
      NSMutableDictionary threeB = new NSMutableDictionary(new NSArray(Arrays.asList("Android", Integer.valueOf(55), "02/2011")), keys);
      NSMutableDictionary threeC = new NSMutableDictionary(new NSArray(Arrays.asList("Android", Integer.valueOf(110), "03/2011")), keys);

      _itemSet1a = new NSArray(Arrays.asList(oneA, oneB, oneC, twoA, twoB, twoC, threeA, threeB, threeC));
    }
    //System.out.println("itemSet1a = "+_itemSet1a);
    return _itemSet1a;
  }
View Full Code Here

  //
  private NSArray _itemSet2;
 
  public NSArray itemSet2() {
    if (_itemSet2 == null) {
      NSArray keys = new NSArray(Arrays.asList("name", "value", "category"));
     
      NSMutableDictionary oneA = new NSMutableDictionary(new NSArray(Arrays.asList("iPhone", Integer.valueOf(20), "01/2011")), keys);
      NSMutableDictionary oneB = new NSMutableDictionary(new NSArray(Arrays.asList("iPhone", Integer.valueOf(25), "02/2011")), keys);
      NSMutableDictionary oneC = new NSMutableDictionary(new NSArray(Arrays.asList("iPhone", Integer.valueOf(30), "03/2011")), keys);
      NSMutableDictionary oneD = new NSMutableDictionary(new NSArray(Arrays.asList("iPhone", Integer.valueOf(75), "Total Q1")), keys);

      _itemSet2 = new NSArray(Arrays.asList(oneA, oneB, oneC, oneD));
    }
    //System.out.println("itemSet2 = "+_itemSet2);
    return _itemSet2;
  }
View Full Code Here

     * </span>
     */
    @SuppressWarnings("javadoc")
  public static NSArray arrayForKeyWithDefault(final String s, final NSArray defaultValue) {
        final String propertyName = getApplicationSpecificPropertyName(s);
    NSArray value;
    Object cachedValue = _cache.get(propertyName);
    if (UndefinedMarker.equals(cachedValue)) {
      value = defaultValue;
    } else if (cachedValue instanceof NSArray) {
      value = (NSArray) cachedValue;
View Full Code Here

    public static NSArray<String> pathsForUserAndBundleProperties(boolean reportLoggingEnabled) {
        NSMutableArray<String> propertiesPaths = new NSMutableArray();
        NSMutableArray<String> projectsInfo = new NSMutableArray();

        /*  Properties for frameworks */
        NSArray frameworkNames = (NSArray) NSBundle.frameworkBundles().valueForKey("name");
        Enumeration e = frameworkNames.reverseObjectEnumerator();
        while (e.hasMoreElements()) {
          String frameworkName = (String) e.nextElement();

          String propertyPath = ERXFileUtilities.pathForResourceNamed("Properties", frameworkName, null);
          addIfPresent(frameworkName + ".framework", propertyPath, propertiesPaths, projectsInfo);
View Full Code Here

TOP

Related Classes of com.webobjects.foundation.NSArray$Operator

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.