Package com.webobjects.foundation

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


        for (int i=0; i<theCount; i++) {
            final int j = i;
            Runnable work = new Runnable() {
                public void run() {
                    try {
                        localMonitor.stopInstance((MInstance) instanceArray.objectAtIndex(j));
                    } catch (MonitorException me) {}
                }
            };
            workers[j] = new Thread(work);
            workers[j].start();
View Full Code Here


            if(attribute.userInfo() != null) {
              attributeUserInfo.addEntriesFromDictionary(attribute.userInfo());
            }
            attributeUserInfo.setObjectForKey(languages, LANGUAGES_KEY);
            for (int i = 0; i < languages.count(); i++) {
              String language = (String) languages.objectAtIndex(i);
              String newName = name + "_" + language;
              // columnName = columnName.replaceAll("_(\\w)$", "_" + language);
              EOAttribute copy = cloneAttribute(entity, attribute, newName);

              String newColumnName = columnName + "_" + language;
View Full Code Here

                    applicationResponse = new NSMutableArray(appArrayCount);

                    // query - for each application - runningInstancesCount_W();
                    for (int i=0; i<appArrayCount; i++) {
                        anApp = (MApplication) appArray.objectAtIndex(i);
                        name = anApp.name();
                        runningInstances = anApp.runningInstancesCount_W();
                        elementApp = new NSDictionary(new Object[]{name, runningInstances}, appQueryKeys);
                        applicationResponse.addObject(elementApp);
                    }
View Full Code Here

        for (int i=0; i<theCount; i++) {
            final int j = i;
            Runnable work = new Runnable() {
                public void run() {
                    try {
                        responses[j] = localMonitor.queryInstance((MInstance) instanceArray.objectAtIndex(j));
                    } catch (MonitorException me) {
                        MInstance badInstance = ((MInstance) instanceArray.objectAtIndex(j));
                        if ( (!badInstance.isRunning_W()) &&
                             (NSLog.debugLoggingAllowedForLevelAndGroups(NSLog.DebugLevelCritical, NSLog.DebugGroupDeployment)) ) {
                            NSLog.debug.appendln("Exception getting Statistics for instance: " + ((MInstance) instanceArray.objectAtIndex(j)).displayName());
View Full Code Here

            Runnable work = new Runnable() {
                public void run() {
                    try {
                        responses[j] = localMonitor.queryInstance((MInstance) instanceArray.objectAtIndex(j));
                    } catch (MonitorException me) {
                        MInstance badInstance = ((MInstance) instanceArray.objectAtIndex(j));
                        if ( (!badInstance.isRunning_W()) &&
                             (NSLog.debugLoggingAllowedForLevelAndGroups(NSLog.DebugLevelCritical, NSLog.DebugGroupDeployment)) ) {
                            NSLog.debug.appendln("Exception getting Statistics for instance: " + ((MInstance) instanceArray.objectAtIndex(j)).displayName());
                        }
                        //if we get an exception and the instance state is running, that could mean the app may have been too
View Full Code Here

                        responses[j] = localMonitor.queryInstance((MInstance) instanceArray.objectAtIndex(j));
                    } catch (MonitorException me) {
                        MInstance badInstance = ((MInstance) instanceArray.objectAtIndex(j));
                        if ( (!badInstance.isRunning_W()) &&
                             (NSLog.debugLoggingAllowedForLevelAndGroups(NSLog.DebugLevelCritical, NSLog.DebugGroupDeployment)) ) {
                            NSLog.debug.appendln("Exception getting Statistics for instance: " + ((MInstance) instanceArray.objectAtIndex(j)).displayName());
                        }
                        //if we get an exception and the instance state is running, that could mean the app may have been too
                        //busy to respond of may have locked up in either case, we need to notify
                      //java monitor which instance its having problems with
                        if (badInstance.isRunning_W())
View Full Code Here

    String path = getProperty(aModelName + ".DBPath", "dbConnectPathGLOBAL");
    if (path != null) {
      if (path.indexOf(" ") != -1) {
        NSArray a = NSArray.componentsSeparatedByString(path, " ");
        if (a.count() == 2) {
          path = ERXFileUtilities.pathForResourceNamed((String) a.objectAtIndex(0), (String) a.objectAtIndex(1), null);
        }
      }
    }
    else {
      // by default we take <modelName>.db in the directory we
View Full Code Here

    String path = getProperty(aModelName + ".DBPath", "dbConnectPathGLOBAL");
    if (path != null) {
      if (path.indexOf(" ") != -1) {
        NSArray a = NSArray.componentsSeparatedByString(path, " ");
        if (a.count() == 2) {
          path = ERXFileUtilities.pathForResourceNamed((String) a.objectAtIndex(0), (String) a.objectAtIndex(1), null);
        }
      }
    }
    else {
      // by default we take <modelName>.db in the directory we
View Full Code Here

                if( array.count() == 0 ){
                    return true;
                } else if( array.count() == 1 ) {
                    //it could be that the object found is itself
                    EOEnterpriseObject localObject = EOUtilities.localInstanceOfObject(GSVOtherMethods._editingContext, (EOEnterpriseObject)object);
                    return ( (EOEnterpriseObject)array.objectAtIndex(0) == localObject );
                }
            }
        }
        return false;
    }
View Full Code Here

          NSArray aValue = request.formValuesForKey(uploadName());

          if (aValue != null) {
            NSData data = null;
            try {
              data = (NSData) aValue.objectAtIndex(0);
            } catch (ClassCastException e) {
              throw new ClassCastException("AjaxUploadButton: Value in request was of type '" + aValue.objectAtIndex(0).getClass().getName() + "' instead of NSData. Verify that the WOForm's 'enctype' binding is set to 'multipart/form-data'");
            }
            setData(data);
          }
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.