/* (non-Javadoc)
@see com.github.chrisprice.phonegapbuild.api.managers.AppsManager#getApp(com.sun.jersey.api.client.WebResource, com.github.chrisprice.phonegapbuild.api.data.ResourcePath)
481508
@Override
  public AppResponse getApp(WebResource resource, ResourcePath<App> appResourcePath) {
    return resource.path(appResourcePath.getPath()).get(AppResponse.class);
  }
937667
public Resource getResource(String path) {
        final Resource descriptorResource = descriptor.getResource();

        try {
            Resource resource = descriptorResource.createRelative("static" + path);
            if (resource.exists()) {
                return resource;
            }
        } catch (IOException e) {
            return null;
        }
        return null;
    }
695316
public static String getPathForResource(final String resourcePath) {
        URL path = ResourceUtil.class.getResource(resourcePath);
        if (path == null) {
            path = ResourceUtil.class.getResource("/");
            File tmpFile = new File(path.getPath(), resourcePath);
            return tmpFile.getPath();
        }

        return path.getPath();
    }
936807
function resolveAppBuild(appTsConfigPath) {
  const outDir = getAppBuildFolder(appTsConfigPath);
  const buildPath = path.join(path.dirname(appTsConfigPath), outDir);
  return buildPath;
}
820804
@Override
    public URL getResource( String path )
    {
        URL url = null;
        if ( baseLoader != null )
            // classloader wants no leading slash
            url = baseLoader.getResource( path.substring(1) );
        if ( url == null )
            url = super.getResource( path );
        return url;
    }
296756
private String buildApplicationUrl(final UIContext uic) {
		Environment env = uic.getEnvironment();
		return env.getPostPath();
	}
271309
function get(params, cb) {
  var resourcePath = "/appforms/config";
  var method = "GET";
  var data = {};

  params.resourcePath = resourcePath;
  params.method = method;
  params.data = data;

  mbaasRequest.app(params, cb);
}
735340
@GET
    @Produces({MediaType.TEXT_HTML, MediaType.APPLICATION_JSON})
    @Path("/{gavc}" + ServerAPI.GET_MODULE)
    public Response getModule(@PathParam("gavc") final String gavc, @Context final UriInfo uriInfo){
        if(LOG.isInfoEnabled()) {
            LOG.info(String.format("Got a get artifact's module request [%s]", gavc));
        }

        final ArtifactHandler artifactHandler = getArtifactHandler();
        final DbArtifact artifact = artifactHandler.getArtifact(gavc);
        final DbModule module = artifactHandler.getModule(artifact);

        if(module == null){
            return Response.noContent().build();
        }

        final ModuleView view = new ModuleView();
        view.setModule(getModelMapper().getModule(module));
        view.setOrganization(module.getOrganization());

        return Response.ok(view).build();
    }
64511
def get_app_dir(app):
    
    path = __app_dirs__.get(app)
    if path is not None:
        return path
    else:
        p = app.split('.')
        try:
            path = pkg.resource_filename(p[0], '')
        except ImportError as e:
            log.error("Can't import app %s" % app)
            log.exception(e)
            path = ''
        if len(p) > 1:
            path = os.path.join(path, *p[1:])
        
        __app_dirs__[app] = path
        return path
347522
@Override
	public Response loadUnzippedApplicationTemplate( String localFilePath ) {

		if( localFilePath == null )
			localFilePath = "null";

		this.logger.fine( "Request: load application from a local file (" + localFilePath + ")." );
		Response response;
		try {
			ApplicationTemplate tpl = this.manager.applicationTemplateMngr().loadApplicationTemplate( new File( localFilePath ));
			response = Response.ok().entity( tpl ).build();

		} catch( AlreadyExistingException e ) {
			response = handleError(
					Status.FORBIDDEN,
					new RestError( REST_MNGMT_CONFLICT, e ),
					lang( this.manager )).build();

		} catch( InvalidApplicationException e ) {
			response = handleError(
					Status.NOT_ACCEPTABLE,
					new RestError( REST_MNGMT_INVALID_TPL, e ),
					lang( this.manager )).build();

		} catch( IOException e ) {
			response = handleError(
					Status.UNAUTHORIZED,
					new RestError( REST_SAVE_ERROR, e ),
					lang( this.manager )).build();

		} catch( UnauthorizedActionException e ) {
			response = handleError(
					Status.CONFLICT,
					new RestError( REST_MNGMT_CONFLICT, e ),
					lang( this.manager )).build();
		}

		return response;
	}
538302
@Override
	public String getFilePath(String resourcePath) {
		String path = getResolver().getResourcePath(resourcePath);
		return rsBrowser.getFilePath(path);
	}
126333
@GET
  @Path("/{asset: .+}")
  public Response getSwaggerUiAsset(@PathParam("asset") String assetPath) {
    if (!ASSETS.contains(assetPath)) {
      return Response.status(404).build();
    }

    InputStream stream = getClass().getResourceAsStream("ui-dist/" + assetPath);
    return Response.ok(stream).build();
  }
293219
func (c *Client) GetAppByGuidNoInlineCall(guid string) (App, error) {
	var appResource AppResource
	r := c.NewRequest("GET", "/v2/apps/"+guid)
	resp, err := c.DoRequest(r)
	if err != nil {
		return App{}, errors.Wrap(err, "Error requesting apps")
	}
	defer resp.Body.Close()
	resBody, err := ioutil.ReadAll(resp.Body)
	if err != nil {
		return App{}, errors.Wrap(err, "Error reading app response body")
	}

	err = json.Unmarshal(resBody, &appResource)
	if err != nil {
		return App{}, errors.Wrap(err, "Error unmarshalling app")
	}
	app := c.mergeAppResource(appResource)

	// If no Space Information no need to check org.
	if app.SpaceGuid != "" {
		//Getting Spaces Resource
		space, err := app.Space()
		if err != nil {
			errors.Wrap(err, "Unable to get the Space for the apps "+app.Name)
		} else {
			app.SpaceData.Entity = space

		}

		//Getting orgResource
		org, err := app.SpaceData.Entity.Org()
		if err != nil {
			errors.Wrap(err, "Unable to get the Org for the apps "+app.Name)
		} else {
			app.SpaceData.Entity.OrgData.Entity = org
		}
	}

	return app, nil
}
829011
public URL findResourceURL(String resourcePath, String versionRange)
    {
        //if (ClassServiceBootstrap.repositoryAdmin == null)
        //    return null;

        URL url = this.getResourceFromBundle(null, resourcePath, versionRange);

        if (url == null) {
            Object resource = this.deployThisResource(ClassFinderActivator.getPackageName(resourcePath, true), versionRange, false);
            if (resource != null)
            	url = this.getResourceFromBundle(resource, resourcePath, versionRange);
        }

        return url;
    }
13414
public Path getAppEngineSdkForJavaPath() {
    Path resolved = getPath().resolve(APPENGINE_SDK_FOR_JAVA_PATH);
    if (resolved == null) {
      throw new RuntimeException("Misconfigured App Engine SDK for Java");
    }
    return resolved;
  }
1047404
public static appfwfieldtype get(nitro_service service, String name) throws Exception{
		appfwfieldtype obj = new appfwfieldtype();
		obj.set_name(name);
		appfwfieldtype response = (appfwfieldtype) obj.get_resource(service);
		return response;
	}
273096
private URL getResourceFromBundle(Object resource, String resourcePath, String versionRange)
    {
        URL url = null;
        if (resource == null)
        {
            Object classAccess = this.getClassBundleService(null, ClassFinderActivator.getPackageName(resourcePath, true) + FAKE_CLASSNAME, versionRange, null, 0);
            if (classAccess != null)
                url = classAccess.getClass().getClassLoader().getResource(resourcePath);
        }
        else
        {
        	Bundle bundle = this.findBundle(resource, bundleContext, ClassFinderActivator.getPackageName(resourcePath, true), versionRange);
            url = bundle.getEntry(resourcePath);
        }
        return url;
    }