Get all the applications from the nexus IQ server
@param instanceUrl instance of nexus iq
@return List of applications
969923
@Override
    public List<NexusIQApplication> getApplications(String instanceUrl) {
        List<NexusIQApplication> nexusIQApplications = new ArrayList<>();
        String url = instanceUrl + API_V2_APPLICATIONS;

        try {
            JSONObject jsonObject = parseAsObject(url);
            JSONArray jsonArray = (JSONArray) jsonObject.get("applications");
            for (Object obj : jsonArray) {
                JSONObject applicationData = (JSONObject) obj;
                NexusIQApplication application = new NexusIQApplication();
                application.setInstanceUrl(instanceUrl);
                application.setApplicationId(str(applicationData, ID));
                application.setApplicationName(str(applicationData, NAME));
                application.setDescription(application.getApplicationName());
                application.setPublicId(str(applicationData, PUBLIC_ID));
                nexusIQApplications.add(application);
            }
        } catch (ParseException e) {
            LOG.error("Could not parse response from: " + url, e);
        } catch (RestClientException rce) {
            LOG.error(rce);
        }
        return nexusIQApplications;
    }
73101
public java.util.List<String> getInstanceNames() {
        if (instanceNames == null) {
            instanceNames = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return instanceNames;
    }
1270109
public List<URL> getManagedURLs()
    {
        // should we cache it?
        List<URL> managedURL = getJarFileUrls();
        if (managedURL == null)
        {
            managedURL = new ArrayList<URL>(1);
        }

        if (!getExcludeUnlistedClasses())
        {
            managedURL.add(getPersistenceUnitRootUrl());
        }
        return managedURL;
    }
944210
def retrieve_instances(self, query=None):
        
        if query is None:
            data = javabridge.call(self.jobject, "retrieveInstances", "()Lweka/core/Instances;")
        else:
            data = javabridge.call(self.jobject, "retrieveInstances", "(Ljava/lang/String;)Lweka/core/Instances;")
        return Instances(data)
1050873
@Override
	public List<Application> listApplications( String exactName ) {

		if( exactName != null )
			this.logger.fine( "Request: list/find the application named " + exactName + "." );
		else
			this.logger.fine( "Request: list all the applications." );

		List<Application> result = new ArrayList<> ();
		for( ManagedApplication ma : this.manager.applicationMngr().getManagedApplications()) {
			// Equality is on the name, not on the display name
			if( exactName == null || exactName.equals( ma.getName()))
				result.add( ma.getApplication());
		}

		return result;
	}
439969
public static List<Instance> findAllScopedInstances( AbstractApplication app ) {

		List<Instance> instanceList = new ArrayList<> ();
		List<Instance> todo = new ArrayList<> ();
		todo.addAll( app.getRootInstances());

		while( ! todo.isEmpty()) {
			Instance current = todo.remove( 0 );
			todo.addAll( current.getChildren());
			if( isTarget( current ))
				instanceList.add( current );
		}

		return instanceList;
	}
593447
public java.util.List<InstanceFleet> getInstanceFleets() {
        if (instanceFleets == null) {
            instanceFleets = new com.amazonaws.internal.SdkInternalList<InstanceFleet>();
        }
        return instanceFleets;
    }
56397
public function getUrlsList($instanceName)
    {
        // FIXME: $instanceName is no more needed! o_O
        $urlsList = [];

        if ($this->controllerDetector) {
            $detectedControllers = array_values($this->controllerDetector->getControllerIdentifiers($this->controllerAnalyzer));
            $detectedControllers = array_combine($detectedControllers, $detectedControllers);

            $controllers = $this->controllers + $detectedControllers;
        } else {
            $controllers = $this->controllers;
        }

        foreach ($controllers as $controllerInstanceName) {
            $routes = $this->controllerAnalyzer->analyzeController($controllerInstanceName);

            $urlsList = array_merge($urlsList, $routes);
        }

        return $urlsList;
    }
366465
public Collection<MobileApplication> list(List<String> queryParams)
    {
        return HTTP.GET("/v2/mobile_applications.json", null, queryParams, MOBILE_APPLICATIONS).get();
    }
438259
@Override
	public List<Instance> listChildrenInstances( String applicationName, String instancePath, boolean allChildren ) {

		List<Instance> result = new ArrayList<> ();
		Application app = this.manager.applicationMngr().findApplicationByName( applicationName );

		// Log
		if( instancePath == null )
			this.logger.fine( "Request: list " + (allChildren ? "all" : "root") + " instances for " + applicationName + "." );
		else
			this.logger.fine( "Request: list " + (allChildren ? "all" : "direct") + " children instances for " + instancePath + " in " + applicationName + "." );

		// Find the instances
		Instance inst;
		if( app != null ) {
			if( instancePath == null ) {
				if( allChildren )
					result.addAll( InstanceHelpers.getAllInstances( app ));
				else
					result.addAll( app.getRootInstances());
			}

			else if(( inst = InstanceHelpers.findInstanceByPath( app, instancePath )) != null ) {
				if( allChildren ) {
					result.addAll( InstanceHelpers.buildHierarchicalList( inst ));
					result.remove( inst );
				} else {
					result.addAll( inst.getChildren());
				}
			}
		}

		// Bug #64: sort instance paths for the clients
		Collections.sort( result, new InstanceComparator());
		return result;
	}
1019699
public Collection<ApplicationHost> list(long applicationId, List<String> queryParams)
    {
        return HTTP.GET(String.format("/v2/applications/%d/hosts.json", applicationId), null, queryParams, APPLICATION_HOSTS).get();
    }
142822
public java.util.List<InstanceProfile> getInstanceProfiles() {
        if (instanceProfiles == null) {
            instanceProfiles = new com.amazonaws.internal.SdkInternalList<InstanceProfile>();
        }
        return instanceProfiles;
    }
321826
public java.util.List<InstanceInfo> getInstanceInfos() {
        if (instanceInfos == null) {
            instanceInfos = new com.amazonaws.internal.SdkInternalList<InstanceInfo>();
        }
        return instanceInfos;
    }
1072155
def all(self):
        
        response = requests.get(self._url, **self._default_request_kwargs)
        data = self._get_response_data(response)
        return self._concrete_instance_list(data)
995053
public java.util.List<String> getInstancesList() {
        if (instancesList == null) {
            instancesList = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return instancesList;
    }
529680
public List<String> listInstanceIDs(final Set<String> instanceIDs) {
        Set<String> allInstanceIDs = allMockEc2Instances.keySet();
        if (null == instanceIDs || instanceIDs.size() == 0) {
            return new ArrayList<String>(allInstanceIDs);
        } else {
            List<String> filteredInstanceIDs = new ArrayList<String>();
            for (String id : allInstanceIDs) {
                if (null != id && instanceIDs.contains(id)) {
                    filteredInstanceIDs.add(id);
                }
            }
            return filteredInstanceIDs;
        }
    }
779595
public Optional<ApplicationInstance> show(long applicationId, long instanceId)
    {
        return HTTP.GET(String.format("/v2/applications/%d/instances/%d.json", applicationId, instanceId), APPLICATION_INSTANCE);
    }