/* (non-Javadoc)
@see com.github.chrisprice.phonegapbuild.api.managers.AppsManager#getApps(com.sun.jersey.api.client.WebResource, com.github.chrisprice.phonegapbuild.api.data.ResourcePath)
428387
@Override
  public AppsResponse getApps(WebResource resource, ResourcePath<Apps> appsResponsePath) {
    return resource.path(appsResponsePath.getPath()).get(AppsResponse.class);
  }
17678
@RequestMapping(value = "application", method = RequestMethod.GET)
    public Resources<ApplicationInfo> applicationInfo() {
        return Resources.of(
                applicationInfoService.getApplicationInfoList(),
                uri(on(InfoController.class).applicationInfo())
        );
    }
350028
public static appfwpolicy[] get(nitro_service service) throws Exception{
		appfwpolicy obj = new appfwpolicy();
		appfwpolicy[] response = (appfwpolicy[])obj.get_resources(service);
		return response;
	}
930866
@SuppressWarnings("unchecked")
	@Override
	public Set<String> getResourceNames(String path) {
		Set<String> paths = context.getResourcePaths(path);
		Set<String> names = new HashSet<>();
		int length = path.length();
		if (null != paths) {
			for (String resourcePath : paths) {
				names.add(resourcePath.substring(length, resourcePath.length()));
			}
		}
		return names;
	}
42897
private CmsJspResourceWrapper readResource(String sitePath) {

        CmsJspResourceWrapper result = null;
        try {
            result = new CmsJspResourceWrapper(m_cms, m_cms.readResource(sitePath));
        } catch (CmsException e) {
            if (LOG.isDebugEnabled()) {
                LOG.debug(e.getMessage(), e);
            }
        }
        return result;
    }
826106
@Override
	public String getFilePath(String resourcePath) {

		String filePath = null;
		List<ResourceBrowser> list = new ArrayList<>();
		list.addAll(resourceInfoProviders);
		for (Iterator<ResourceBrowser> iterator = list.iterator(); iterator.hasNext() && filePath == null;) {
			ResourceBrowser rsBrowser = iterator.next();
			if (generatorRegistry.isPathGenerated(resourcePath)) {
				if (rsBrowser instanceof ResourceGenerator) {
					ResourceGenerator rsGeneratorBrowser = (ResourceGenerator) rsBrowser;
					if (rsGeneratorBrowser.getResolver().matchPath(resourcePath)) {
						filePath = rsBrowser.getFilePath(resourcePath);
					}
				}
			} else {
				if (!(rsBrowser instanceof ResourceGenerator)) {
					filePath = rsBrowser.getFilePath(resourcePath);
				}
			}
		}
		return filePath;
	}
1216687
public String compile(String resourcePath, String coffeeScriptSource) {

		String result = null;
		try {
			result = (String) jsEngine.invokeMethod(coffeeScript, "compile", coffeeScriptSource, options);
		} catch (NoSuchMethodException | ScriptException e) {
			throw new BundlingProcessException(e);
		}

		return result;
	}
506739
function getAppFolders(input, deploymentApplicationType) {
    const destinationPath = this.destinationPath(input);
    const files = shelljs.ls('-l', destinationPath);
    const appsFolders = [];

    files.forEach(file => {
        if (file.isDirectory()) {
            if (shelljs.test('-f', `${destinationPath}/${file.name}/.yo-rc.json`)) {
                try {
                    const fileData = this.fs.readJSON(`${destinationPath}/${file.name}/.yo-rc.json`);
                    if (
                        fileData['generator-jhipster'].baseName !== undefined &&
                        (deploymentApplicationType === undefined ||
                            deploymentApplicationType === fileData['generator-jhipster'].applicationType ||
                            (deploymentApplicationType === 'microservice' &&
                                fileData['generator-jhipster'].applicationType === 'gateway') ||
                            (deploymentApplicationType === 'microservice' && fileData['generator-jhipster'].applicationType === 'uaa'))
                    ) {
                        appsFolders.push(file.name.match(/([^/]*)\/*$/)[1]);
                    }
                } catch (err) {
                    this.log(chalk.red(`${file}: this .yo-rc.json can't be read`));
                    this.debug('Error:', err);
                }
            }
        }
    });

    return appsFolders;
}
135944
@Override
    public Enumeration<URL> getResources(final String path) throws IOException {
        final ResourceList resourceList = scanResult.getResourcesWithPath(path);
        if (resourceList == null || resourceList.isEmpty()) {
            return super.getResources(path);
        } else {
            return new Enumeration<URL>() {
                /** The idx. */
                int idx;

                @Override
                public boolean hasMoreElements() {
                    return idx < resourceList.size();
                }

                @Override
                public URL nextElement() {
                    return resourceList.get(idx++).getURL();
                }
            };
        }
    }
86815
private static String getClasspathResourceAsString(String resourcePath) {
        try (InputStream is = DefaultHelperClassSourceProvider.class.getClassLoader().getResourceAsStream(resourcePath);
             java.util.Scanner s = new java.util.Scanner(is)) {
            return s.useDelimiter("\\A").hasNext() ? s.next() : "";
        } catch (IOException e) {
            throw new RuntimeException(e);
            //should never happen and if it does then all RuntimeExceptions should be caught in LambdaFactory
        }
    }
407799
def get_apps(self):
        
        apps = []
        for resource in self._get_apps()['resources']:
            apps.append(resource['entity']['name'])

        return apps
1055180
@Override
	public Response getCommandInstructions( String appName, String commandName ) {

		this.logger.fine("Request: get instructions from " + commandName + " in the " + appName + " application.");
		Response response;
		try {
			Application app = this.manager.applicationMngr().findApplicationByName( appName );
			String res;
			if( app == null )
				response = Response.status( Status.NOT_FOUND ).build();
			else if( Utils.isEmptyOrWhitespaces( res = this.manager.commandsMngr().getCommandInstructions( app, commandName )))
				response = Response.status( Status.NO_CONTENT ).build();
			else
				response = Response.ok( res ).build();

		} catch( IOException e ) {
			response = RestServicesUtils.handleError(
					Status.INTERNAL_SERVER_ERROR,
					new RestError( ErrorCode.REST_UNDETAILED_ERROR, e ),
					lang( this.manager )).build();
		}

		return response;
	}
1304400
@Override
    public Set<String> getDependentApplications() {
        Set<String> appsToStop = new HashSet<String>(applications);
        applications.clear();
        return appsToStop;
    }
864253
@Override
	public Set<String> getResourceNames(String path) {
		return helper.getResourceNames(resolver.getResourcePath(path));
	}
77643
@Override
    Resource getResource(final String relativePath) {
        return allResourcePaths.contains(relativePath) ? newResource(relativePath) : null;
    }
565809
public String getAppInfo(ClusterNode node, ResourceType type) {
    Map<ResourceType, String> resourceInfos = nameToApps.get(node.getName());
    if (resourceInfos == null) {
      return null;
    } else {
      return resourceInfos.get(type);
    }
  }
1171684
private WebResource getResource(WebResource service, APIInfo api, String... pathParams) {
        WebResource resource = service.path(api.getPath());
        resource = appendPathParams(resource, pathParams);
        return resource;
    }